cvs: /php3 alloc.c configuration-parser.y constants.c control_structures.h control_structures_inline.h debugger.c fopen-wrappers.c fopen-wrappers.h
highlight.c internal_functions.c language-parser.y language-scanner.lex list.c main.c main.h mod_php3.c modules.h operators.c php.h php3_hash.c
php3_list.h php3_realpath.c request_info.c request_info.h safe_mode.c tls.c tls.h token_cache.c token_cache.h variables.c /php3/dl/mssql mssql.c
php3_mssql.h /php3/functions apache.c aspell.c base64.c basic_functions.c bcmath.c browscap.c cpdf.c datetime.c dav.c db.c dbase.c dir.c dl.c dns.c
exec.c fdf.c fhttpd.c file.c filepro.c filestat.c formatted_print.c fsock.c gd.c head.c html.c hw.c ifx.ec imap.h imsp.h info.c interbase.c ldap.c
link.c magick.c mail.c math.c md5.c microtime.c mime.c msql.c mysql.c number.c oci8.c oracle.c pack.c pageinfo.c pdf.c php3_ifx.h php3_ldap.h
php3_mcal.h php3_mckcrypt.c php3_msql.h php3_mysql.h php3_posix.h php3_recode.h php3_string.h php3_unified_odbc.h posix.c post.c recode.c reg.c rpc.c
string.c syslog.c unified_odbc.c uniqid.c url.c var.c xml.c /php3/win32 apache.dsp dbase.dsp filepro.dsp imap4.dsp pwd.c sendmail.c snmp.dsp time.c
winutil.c wsyslog.c zlib.dsp
| From: | Rasmus Lerdorf | Date: | Sun, 26 Dec 1999 18:44:53 +0000 |
| Subject: | cvs: /php3 alloc.c configuration-parser.y constants.c control_structures.h control_structures_inline.h debugger.c fopen-wrappers.c fopen-wrappers.h highlight.c internal_functions.c language-parser.y language-scanner.lex list.c main.c main.h mod_php3.c modules.h operators.c php.h php3_hash.c php3_list.h php3_realpath.c request_info.c request_info.h safe_mode.c tls.c tls.h token_cache.c token_cache.h variables.c /php3/dl/mssql mssql.c php3_mssql.h /php3/functions apache.c aspell.c base64.c basic_functions.c bcmath.c browscap.c cpdf.c datetime.c dav.c db.c dbase.c dir.c dl.c dns.c exec.c fdf.c fhttpd.c file.c filepro.c filestat.c formatted_print.c fsock.c gd.c head.c html.c hw.c ifx.ec imap.h imsp.h info.c interbase.c ldap.c link.c magick.c mail.c math.c md5.c microtime.c mime.c msql.c mysql.c number.c oci8.c oracle.c pack.c pageinfo.c pdf.c php3_ifx.h php3_ldap.h php3_mcal.h php3_mckcrypt.c php3_msql.h php3_mysql.h php3_posix.h php3_recode.h php3_string.h php3_unified_odbc.h posix.c post.c recode.c reg.c rpc.c string.c syslog.c unified_odbc.c uniqid.c url.c var.c xml.c /php3/win32 apache.dsp dbase.dsp filepro.dsp imap4.dsp pwd.c sendmail.c snmp.dsp time.c winutil.c wsyslog.c zlib.dsp |
||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-14051@lists.php.net to get a copy of this message | ||
rasmus Sun Dec 26 13:44:53 1999 EDT
Modified files:
/php3 alloc.c configuration-parser.y constants.c
control_structures.h control_structures_inline.h debugger.c
fopen-wrappers.c fopen-wrappers.h highlight.c
internal_functions.c language-parser.y language-scanner.lex
list.c main.c main.h mod_php3.c modules.h operators.c php.h
php3_hash.c php3_list.h php3_realpath.c request_info.c
request_info.h safe_mode.c tls.c tls.h token_cache.c
token_cache.h variables.c
/php3/dl/mssql mssql.c php3_mssql.h
/php3/functions apache.c aspell.c base64.c basic_functions.c
bcmath.c browscap.c cpdf.c datetime.c dav.c db.c
dbase.c dir.c dl.c dns.c exec.c fdf.c fhttpd.c
file.c filepro.c filestat.c formatted_print.c
fsock.c gd.c head.c html.c hw.c ifx.ec imap.h
imsp.h info.c interbase.c ldap.c link.c magick.c
mail.c math.c md5.c microtime.c mime.c msql.c
mysql.c number.c oci8.c oracle.c pack.c pageinfo.c
pdf.c php3_ifx.h php3_ldap.h php3_mcal.h
php3_mckcrypt.c php3_msql.h php3_mysql.h
php3_posix.h php3_recode.h php3_string.h
php3_unified_odbc.h posix.c post.c recode.c reg.c
rpc.c string.c syslog.c unified_odbc.c uniqid.c
url.c var.c xml.c
/php3/win32 apache.dsp dbase.dsp filepro.dsp imap4.dsp pwd.c
sendmail.c snmp.dsp time.c winutil.c wsyslog.c zlib.dsp
Log:
Clean up and remove all the PHP_31 and THREAD_SAFE crud that isn't used.
The tree was tagged just before this commit with 'before_removing_ts' just
in case we need to revert this for some reason. CGI and Apache builds
have been tested on Unix. Windows build has not.
Index: php3/alloc.c
diff -u php3/alloc.c:1.84 php3/alloc.c:1.85
--- php3/alloc.c:1.84 Tue Mar 2 06:17:58 1999
+++ php3/alloc.c Sun Dec 26 13:44:36 1999
@@ -7,9 +7,6 @@
*/
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "alloc.h"
#include "php.h"
@@ -24,7 +21,6 @@
#endif
-#ifndef THREAD_SAFE
static mem_header *head;
void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
unsigned char cache_count[MAX_CACHED_MEMORY];
@@ -32,7 +28,6 @@
# if MEMORY_LIMIT
static unsigned int allocated_memory;
static unsigned char memory_exhausted;
-#endif
#endif
# if MEMORY_LIMIT
Index: php3/configuration-parser.y
diff -u php3/configuration-parser.y:1.78 php3/configuration-parser.y:1.79
--- php3/configuration-parser.y:1.78 Mon Aug 23 10:14:02 1999
+++ php3/configuration-parser.y Sun Dec 26 13:44:36 1999
@@ -30,12 +30,9 @@
-/* $Id: configuration-parser.y,v 1.78 1999/08/23 14:14:02 bjh Exp $ */
+/* $Id: configuration-parser.y,v 1.79 1999/12/26 18:44:36 rasmus Exp $ */
#define DEBUG_CFG_PARSER 1
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h"
#include "modules.h"
#include "functions/dl.h"
@@ -52,10 +49,8 @@
#define PARSING_MODE_BROWSCAP 1
static HashTable configuration_hash;
-#ifndef THREAD_SAFE
extern HashTable browser_hash;
extern char *php3_ini_path;
-#endif
static HashTable *active__php3_hash_table;
static pval *current_section;
static char *currently_parsed_filename;
Index: php3/constants.c
diff -u php3/constants.c:1.25 php3/constants.c:1.26
--- php3/constants.c:1.25 Tue May 18 22:06:06 1999
+++ php3/constants.c Sun Dec 26 13:44:36 1999
@@ -27,10 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: constants.c,v 1.25 1999/05/19 02:06:06 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: constants.c,v 1.26 1999/12/26 18:44:36 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "constants.h"
@@ -39,9 +36,7 @@
-#ifndef THREAD_SAFE
static HashTable php3_constants;
-#endif
static void register_constant(php3_constant *c);
void free_php3_constant(php3_constant *c)
Index: php3/control_structures.h
diff -u php3/control_structures.h:1.42 php3/control_structures.h:1.43
--- php3/control_structures.h:1.42 Fri Jan 1 12:58:48 1999
+++ php3/control_structures.h Sun Dec 26 13:44:36 1999
@@ -29,7 +29,7 @@
*/
-/* $Id: control_structures.h,v 1.42 1999/01/01 17:58:48 zeev Exp $ */
+/* $Id: control_structures.h,v 1.43 1999/12/26 18:44:36 rasmus Exp $ */
#ifndef _CONTROL_STRUCTURES_H
@@ -59,7 +59,6 @@
HashTable *ht;
} variable_tracker;
-#ifndef THREAD_SAFE
extern TokenCacheManager token_cache_manager;
extern Stack css, input_source_stack, for_stack, function_state_stack,
switch_stack,variable_unassign_stack;
extern int ExecuteFlag, Execute;
@@ -69,7 +68,6 @@
extern unsigned int param_index;
extern char *class_name;
extern HashTable *class_symbol_table;
-#endif
extern int init_resource_list(void);
extern int init_resource_plist(void);
Index: php3/control_structures_inline.h
diff -u php3/control_structures_inline.h:1.201 php3/control_structures_inline.h:1.202
--- php3/control_structures_inline.h:1.201 Wed Oct 13 10:10:09 1999
+++ php3/control_structures_inline.h Sun Dec 26 13:44:36 1999
@@ -29,22 +29,17 @@
*/
-/* $Id: control_structures_inline.h,v 1.201 1999/10/13 14:10:09 thies Exp $ */
+/* $Id: control_structures_inline.h,v 1.202 1999/12/26 18:44:36 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h"
#include "internal_functions.h"
#include "functions/head.h"
#include <stdio.h>
#include <string.h>
-#ifndef THREAD_SAFE
extern pval *array_ptr;
static pval return_value;
HashTable list, plist;
-#endif
extern inline int cs_global_variable(pval *varname INLINE_TLS);
extern inline int cs_static_variable(pval *varname, pval *value INLINE_TLS);
Index: php3/debugger.c
diff -u php3/debugger.c:1.70 php3/debugger.c:1.71
--- php3/debugger.c:1.70 Wed Jun 16 07:34:12 1999
+++ php3/debugger.c Sun Dec 26 13:44:36 1999
@@ -27,11 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: debugger.c,v 1.70 1999/06/16 11:34:12 ssb Exp $ */
-#if THREAD_SAFE
-#include "tls.h"
-#endif
-
+/* $Id: debugger.c,v 1.71 1999/12/26 18:44:36 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "modules.h"
@@ -71,7 +67,6 @@
extern int lookup_hostname(const char *addr, struct in_addr *in);
int _php3_send_error(char *message, char *address);
-#ifndef THREAD_SAFE
static int debug_socket = 0;
static char *myhostname = NULL;
static char *currenttime = NULL;
@@ -80,11 +75,10 @@
long debugger_port = 0;
long debugger_default = 0;
long debugger_on = 0;
-# if WIN32|WINNT
+#if WIN32|WINNT
static int mypid=0;
-# else
+#else
static pid_t mypid = 0;
-# endif
#endif
#if WIN32|WINNT
@@ -181,10 +175,7 @@
static char *
get_current_time(void)
{
- /*THREADX*/
-#ifndef THREAD_SAFE
static char debug_timebuf[50];
-#endif
char microbuf[10];
#if HAVE_GETTIMEOFDAY
struct timeval tv;
Index: php3/fopen-wrappers.c
diff -u php3/fopen-wrappers.c:1.75 php3/fopen-wrappers.c:1.76
--- php3/fopen-wrappers.c:1.75 Thu Nov 11 08:46:51 1999
+++ php3/fopen-wrappers.c Sun Dec 26 13:44:36 1999
@@ -27,11 +27,7 @@
| Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: fopen-wrappers.c,v 1.75 1999/11/11 13:46:51 thies Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: fopen-wrappers.c,v 1.76 1999/12/26 18:44:36 rasmus Exp $ */
#include "php.h"
#include "modules.h"
Index: php3/fopen-wrappers.h
diff -u php3/fopen-wrappers.h:1.25 php3/fopen-wrappers.h:1.26
--- php3/fopen-wrappers.h:1.25 Tue Jun 8 11:02:40 1999
+++ php3/fopen-wrappers.h Sun Dec 26 13:44:36 1999
@@ -26,7 +26,7 @@
| Authors: Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: fopen-wrappers.h,v 1.25 1999/06/08 15:02:40 sas Exp $ */
+/* $Id: fopen-wrappers.h,v 1.26 1999/12/26 18:44:36 rasmus Exp $ */
#ifndef _FOPEN_WRAPPERS_H
#define _FOPEN_WRAPPERS_H
@@ -64,9 +64,7 @@
#define IS_SOCKET 1
#define BAD_URL 2
-#ifndef THREAD_SAFE
extern int wsa_fp; /* a list for open sockets */
-#endif
extern PHPAPI FILE *php3_fopen_wrapper(char *filename, char *mode, int options, int *issock, int
*socketd);
Index: php3/highlight.c
diff -u php3/highlight.c:1.37 php3/highlight.c:1.38
--- php3/highlight.c:1.37 Fri Jan 1 12:58:49 1999
+++ php3/highlight.c Sun Dec 26 13:44:36 1999
@@ -28,16 +28,12 @@
+----------------------------------------------------------------------+
*/
-/* $Id: highlight.c,v 1.37 1999/01/01 17:58:49 zeev Exp $ */
+/* $Id: highlight.c,v 1.38 1999/12/26 18:44:36 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#else
#define YY_TLS_VARS
extern char *phptext;
extern int phpleng;
extern int ExecuteFlag,Execute; /* remove me */
-#endif
#include "php.h"
#include "language-parser.tab.h"
Index: php3/internal_functions.c
diff -u php3/internal_functions.c:1.361 php3/internal_functions.c:1.362
--- php3/internal_functions.c:1.361 Sun Nov 21 18:06:30 1999
+++ php3/internal_functions.c Sun Dec 26 13:44:36 1999
@@ -29,12 +29,8 @@
*/
-/* $Id: internal_functions.c,v 1.361 1999/11/21 23:06:30 kk Exp $ */
+/* $Id: internal_functions.c,v 1.362 1999/12/26 18:44:36 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
#include "php.h"
#ifndef MSVC5
#endif
@@ -123,11 +119,9 @@
extern php3_ini_structure php3_ini;
extern php3_ini_structure php3_ini_master;
-#ifndef THREAD_SAFE
HashTable list_destructors,module_registry;
static int module_count;
int current_module_being_cleaned;
-#endif
unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
Index: php3/language-parser.y
diff -u php3/language-parser.y:1.180 php3/language-parser.y:1.181
--- php3/language-parser.y:1.180 Fri May 14 06:00:24 1999
+++ php3/language-parser.y Sun Dec 26 13:44:37 1999
@@ -31,7 +31,7 @@
*/
-/* $Id: language-parser.y,v 1.180 1999/05/14 10:00:24 sas Exp $ */
+/* $Id: language-parser.y,v 1.181 1999/12/26 18:44:37 rasmus Exp $ */
/*
@@ -45,15 +45,10 @@
*
*/
-#ifdef THREAD_SAFE
-#include "tls.h"
-#define PHP3_THREAD_SAFE
-#else
extern char *phptext;
extern int phpleng;
extern int wanted_exit_status;
#define YY_TLS_VARS
-#endif
#include "php.h"
#include "php3_list.h"
#include "control_structures.h"
@@ -65,7 +60,6 @@
#define YYERROR_VERBOSE
-#ifndef THREAD_SAFE
HashTable symbol_table; /* main symbol table */
HashTable function_table; /* function symbol table */
HashTable include_names; /* included file names are stored here, for error messages */
@@ -131,7 +125,6 @@
pval *array_ptr;
extern int shutdown_requested;
-#endif /* THREAD SAFE*/
#include "control_structures_inline.h"
Index: php3/language-scanner.lex
diff -u php3/language-scanner.lex:1.182 php3/language-scanner.lex:1.183
--- php3/language-scanner.lex:1.182 Sun Aug 8 16:47:19 1999
+++ php3/language-scanner.lex Sun Dec 26 13:44:37 1999
@@ -47,10 +47,6 @@
#include <errno.h>
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
#include "php.h"
#include "language-parser.tab.h"
#include "language-scanner.h"
@@ -71,13 +67,11 @@
# define MY_INPUT input
#endif
-#ifndef THREAD_SAFE
extern Stack input_source_stack;
int php3_display_source; /* whether or not we're in display-source mode */
int php3_preprocess; /* whether we're in preprocess mode */
int phplineno;
static int in_eval;
-#endif
#ifndef YY_TLS_VARS
/* NOTE, YY_TLS_VARS CANNOT have a semicolon after in
Index: php3/list.c
diff -u php3/list.c:1.87 php3/list.c:1.88
--- php3/list.c:1.87 Wed Jun 16 07:34:13 1999
+++ php3/list.c Sun Dec 26 13:44:37 1999
@@ -29,11 +29,8 @@
*/
-/* $Id: list.c,v 1.87 1999/06/16 11:34:13 ssb Exp $ */
+/* $Id: list.c,v 1.88 1999/12/26 18:44:37 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h"
#include "php3_list.h"
#include "modules.h"
Index: php3/main.c
diff -u php3/main.c:1.509 php3/main.c:1.510
--- php3/main.c:1.509 Sat Dec 25 19:53:51 1999
+++ php3/main.c Sun Dec 26 13:44:37 1999
@@ -29,7 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.509 1999/12/26 00:53:51 rasmus Exp $ */
+/* $Id: main.c,v 1.510 1999/12/26 18:44:37 rasmus Exp $ */
/* #define CRASH_DETECTION */
@@ -37,9 +37,6 @@
#undef SHUTDOWN_DEBUG
#define SHUTDOWN_DEBUG(resource)
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include <stdio.h>
#include "php.h"
#ifdef MSVC5
@@ -87,10 +84,8 @@
#if USE_SAPI
#include "serverapi/sapi.h"
void *gLock;
-#ifndef THREAD_SAFE
struct sapi_request_info *sapi_rqst;
#endif
-#endif
#if MSVC5 || !defined(HAVE_GETOPT)
#include "php_getopt.h"
@@ -98,7 +93,6 @@
void *gLock; /*mutex variable */
-#ifndef THREAD_SAFE
int php_connection_status;
int ignore_user_abort;
int error_reporting, tmp_error_reporting;
@@ -130,7 +124,6 @@
HashTable configuration_hash;
extern FILE *phpin;
-#endif
php3_ini_structure php3_ini;
php3_ini_structure php3_ini_master;
@@ -441,11 +434,7 @@
/* phpparse()'s front end to the token cache */
-#ifdef THREAD_SAFE
-int phplex(pval *phplval, struct php3_global_struct *php3_globals, flex_globals * php_flex_gbl)
-#else
int phplex(pval *phplval)
-#endif
{
Token *token;
@@ -491,21 +480,13 @@
#endif
#endif
-#ifdef THREAD_SAFE
- switch (read_next_token(&GLOBAL(token_cache_manager), &token, phplval, php3_globals,
php_flex_gbl)) {
-#else
switch (read_next_token(&GLOBAL(token_cache_manager), &token, phplval)) {
-#endif
case FAILURE:
php3_error(E_ERROR, "Unable to read next token!\n");
return 0;
break;
case DONE_EVAL:
-#ifdef THREAD_SAFE
- return phplex(phplval, php3_globals, php_flex_gbl);
-#else
return phplex(phplval);
-#endif
break;
}
*phplval = token->phplval;
@@ -1629,11 +1610,6 @@
extern char *optarg;
extern int optind;
-#if THREAD_SAFE
-extern flex_globals *yy_init_tls(void);
-extern void yy_destroy_tls(void);
-#endif
-
int main(int argc, char *argv[])
{
int cgi = 0, c, i, len;
@@ -1647,21 +1623,6 @@
int _cgi_started=0;
int regression_test=0;
/* end of temporary locals */
-#ifdef THREAD_SAFE
- php3_globals_struct *php3_globals;
- flex_globals *php_flex_gbl;
- tls_startup();
- tls_create();
- php_flex_gbl = yy_init_tls();
- php3_globals = TlsGetValue(TlsIndex);
-
- if ((php3_globals == 0) && (GetLastError() != 0)) {
- if (!php3_header())
- exit(0);
- PUTS("TlsGetValue error\n");
- return FAILURE;
- }
-#endif
#if WIN32|WINNT
_fmode = _O_BINARY; /*sets default for file streams to binary */
setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */
@@ -1869,11 +1830,7 @@
} else {
pval yylval;
-#ifdef THREAD_SAFE
- while (phplex(&yylval, php3_globals, php_flex_gbl)); /* create the token cache */
-#else
while (phplex(&yylval)); /* create the token cache */
-#endif
tcm_save(&GLOBAL(token_cache_manager));
}
@@ -1884,11 +1841,6 @@
php3_header(); /* Make sure headers have been sent */
php3_request_shutdown((void *) 0 _INLINE_TLS);
php3_module_shutdown(_INLINE_TLS_VOID);
-#ifdef THREAD_SAFE
- yy_destroy_tls();
- tls_shutdown();
- tls_destroy();
-#endif
exit(wanted_exit_status);
} else {
return FAILURE;
@@ -2011,22 +1963,6 @@
char *pn;
struct stat statbuf, pstatbuf;
-#ifdef THREAD_SAFE
- php3_globals_struct *php3_globals;
- flex_globals *php_flex_gbl;
- tls_startup();
- tls_create();
- php_flex_gbl = yy_init_tls();
- php3_globals = TlsGetValue(TlsIndex);
-
- if ((php3_globals == 0) && (GetLastError() != 0)) {
- if (!php3_header())
- exit(0);
- PUTS("TlsGetValue error\n");
- return FAILURE;
- }
-#endif
-
#ifdef HAVE_SETLOCALE
setlocale(LC_CTYPE, "");
#endif
@@ -2255,11 +2191,7 @@
if (GLOBAL(php3_preprocess)!=PREPROCESS_NONE) {
pval yylval;
-#ifdef THREAD_SAFE
- while (phplex(&yylval, php3_globals, php_flex_gbl)); /* create the token cache */
-#else
while (phplex(&yylval)); /* create the token cache */
-#endif
tcm_save(&GLOBAL(token_cache_manager));
seek_token(&GLOBAL(token_cache_manager), 0, NULL);
GLOBAL(php3_preprocess) = PREPROCESS_NONE;
@@ -2278,13 +2210,6 @@
}
}
php3_module_shutdown(_INLINE_TLS_VOID);
-#ifdef THREAD_SAFE
- if (GLOBAL(initialized)) {
- yy_destroy_tls();
- tls_shutdown();
- tls_destroy();
- }
-#endif
return 0;
}
#endif /* FHTTPD */
@@ -2421,11 +2346,7 @@
snprintf(logmessage,1024,"%d:php3_sapi_main: entering
phplex()\n",GLOBAL(sapi_rqst)->scid);
OutputDebugString(logmessage);
#endif
-#ifdef THREAD_SAFE
- while (phplex(&yylval, php3_globals, php_gbl)); /* create the token cache */
-#else
while (phplex(&yylval)); /* create the token cache */
-#endif
#if DEBUG
snprintf(logmessage,1024,"%d:php3_sapi_main: done
phplex()\n",GLOBAL(sapi_rqst)->scid);
OutputDebugString(logmessage);
Index: php3/main.h
diff -u php3/main.h:1.57 php3/main.h:1.58
--- php3/main.h:1.57 Fri Jan 1 12:58:50 1999
+++ php3/main.h Sun Dec 26 13:44:40 1999
@@ -29,7 +29,7 @@
*/
-/* $Id: main.h,v 1.57 1999/01/01 17:58:50 zeev Exp $ */
+/* $Id: main.h,v 1.58 1999/12/26 18:44:40 rasmus Exp $ */
#ifndef _MAIN_H
@@ -77,11 +77,9 @@
extern int php3_get_lineno(int lineno);
extern char *php3_get_filename(int lineno);
-#ifndef THREAD_SAFE
extern int shutdown_requested;
extern unsigned char header_is_being_sent;
extern int initialized;
-#endif
extern void php3_call_shutdown_functions(void);
Index: php3/mod_php3.c
diff -u php3/mod_php3.c:1.95 php3/mod_php3.c:1.96
--- php3/mod_php3.c:1.95 Fri Dec 3 08:40:38 1999
+++ php3/mod_php3.c Sun Dec 26 13:44:40 1999
@@ -27,12 +27,8 @@
| (with helpful hints from Dean Gaudet <dgaudet@arctic.org> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php3.c,v 1.95 1999/12/03 13:40:38 zeev Exp $ */
+/* $Id: mod_php3.c,v 1.96 1999/12/26 18:44:40 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#include "php.h"
-#else
#include "httpd.h"
#include "http_config.h"
#if MODULE_MAGIC_NUMBER > 19980712
@@ -47,7 +43,6 @@
#include "http_protocol.h"
#include "http_request.h"
#include "http_log.h"
-#endif
#include "util_script.h"
@@ -63,15 +58,7 @@
module MODULE_VAR_EXPORT php3_module;
-#ifndef THREAD_SAFE
int saved_umask;
-#else
-#define GLOBAL(a) php3_globals->a
-#define STATIC GLOBAL
-#define TLS_VARS \
- php3_globals_struct *php3_globals; \
- php3_globals = TlsGetValue(TlsIndex);
-#endif
#ifndef TLS_VARS
#define TLS_VARS
Index: php3/modules.h
diff -u php3/modules.h:1.30 php3/modules.h:1.31
--- php3/modules.h:1.30 Sat Apr 24 09:16:08 1999
+++ php3/modules.h Sun Dec 26 13:44:40 1999
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: modules.h,v 1.30 1999/04/24 13:16:08 sas Exp $ */
+/* $Id: modules.h,v 1.31 1999/12/26 18:44:40 rasmus Exp $ */
#ifndef _MODULES_H
#define _MODULES_H
@@ -57,11 +57,7 @@
php3_module_entry *module;
} php3_builtin_module;
-
-/*FIXME does this need to be thread safe?*/
-#ifndef THREAD_SAFE
extern HashTable module_registry;
-#endif
extern void module_destructor(php3_module_entry *module);
extern int module_registry_cleanup(php3_module_entry *module);
Index: php3/operators.c
diff -u php3/operators.c:1.102 php3/operators.c:1.103
--- php3/operators.c:1.102 Mon Mar 15 11:27:13 1999
+++ php3/operators.c Sun Dec 26 13:44:40 1999
@@ -29,11 +29,8 @@
*/
-/* $Id: operators.c,v 1.102 1999/03/15 16:27:13 andi Exp $ */
+/* $Id: operators.c,v 1.103 1999/12/26 18:44:40 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h"
#include "functions/number.h"
#include <stdio.h>
Index: php3/php.h
diff -u php3/php.h:1.64 php3/php.h:1.65
--- php3/php.h:1.64 Mon Nov 15 06:45:37 1999
+++ php3/php.h Sun Dec 26 13:44:40 1999
@@ -28,7 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php.h,v 1.64 1999/11/15 11:45:37 ssb Exp $ */
+/* $Id: php.h,v 1.65 1999/12/26 18:44:40 rasmus Exp $ */
#ifndef _PHP_H
#define _PHP_H
@@ -104,28 +104,6 @@
# endif
#endif
-/*Thread Safety*/
-#if THREAD_SAFE
-#define GLOBAL(a) php3_globals->a
-#define STATIC GLOBAL
-#define TLS_VARS \
- php3_globals_struct *php3_globals; \
- php3_globals = TlsGetValue(TlsIndex);
-#define CREATE_MUTEX(a,b) a = CreateMutex (NULL, FALSE, b);
-#define SET_MUTEX(a) WaitForSingleObject( a, INFINITE );
-#define FREE_MUTEX(a) ReleaseMutex(a);
-
-/*redirect variables to the flex structure*/
-#if !defined(YY_BUFFER_NEW) && !defined(COMPILE_DL)
-#include "FlexSafe.h"
-#endif
-
-#define INLINE_TLS ,struct php3_global_struct *php3_globals
-#define INLINE_TLS_VOID struct php3_global_struct *php3_globals
-#define _INLINE_TLS ,php3_globals
-#define _INLINE_TLS_VOID php3_globals
-
-#else
#define GLOBAL(a) a
#define STATIC GLOBAL
#define TLS_VARS
@@ -139,8 +117,6 @@
#define _INLINE_TLS
#define _INLINE_TLS_VOID
-#endif
-
/*
* Then the ODBC support can use both iodbc and Solid,
* uncomment this.
@@ -241,9 +217,7 @@
#include "http_log.h"
#define BLOCK_INTERRUPTIONS block_alarms()
#define UNBLOCK_INTERRUPTIONS unblock_alarms()
-# ifndef THREAD_SAFE
extern request_rec *php3_rqst;
-# endif
#endif
#if HAVE_PWD_H
@@ -492,7 +466,6 @@
/* global variables */
-#ifndef THREAD_SAFE
extern HashTable symbol_table, function_table;
extern HashTable include_names;
extern HashTable *active_symbol_table;
@@ -506,12 +479,9 @@
#if (!PHP_ISAPI)
extern char **environ;
#endif
-#endif
extern PHPAPI int le_index_ptr; /* list entry type for index pointers */
-#ifndef THREAD_SAFE
extern int phplex(pval *phplval);
-#endif
extern int lex_scan(pval *phplval);
extern void phperror(char *error);
@@ -525,13 +495,11 @@
extern void html_putc(char c);
/* functions */
-#ifndef THREAD_SAFE
extern int include_file(pval *file,int display_source);
extern int conditional_include_file(pval *file, pval *return_offset);
extern void initialize_input_file_buffer(FILE *f);
extern void eval_string(pval *str, pval *return_offset, int display_source);
extern int end_current_file_execution(int *retval);
-#endif
extern void clean_input_source_stack(void);
extern int _php3_hash_environment(void);
extern int module_startup_modules(void);
@@ -636,9 +604,7 @@
} \
}
-#ifndef THREAD_SAFE
extern int yylineno;
-#endif
extern void phprestart(FILE *input_file);
#if HAVE_DMALLOC
Index: php3/php3_hash.c
diff -u php3/php3_hash.c:1.10 php3/php3_hash.c:1.11
--- php3/php3_hash.c:1.10 Wed Jun 23 14:51:44 1999
+++ php3/php3_hash.c Sun Dec 26 13:44:40 1999
@@ -27,13 +27,7 @@
| Zeev Suraski <bourbon@netvision.net.il> |
+----------------------------------------------------------------------+
*/
-
-
-/* $Id: php3_hash.c,v 1.10 1999/06/23 18:51:44 jim Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
+/* $Id: php3_hash.c,v 1.11 1999/12/26 18:44:40 rasmus Exp $ */
#include "php.h"
#include <stdio.h>
Index: php3/php3_list.h
diff -u php3/php3_list.h:1.7 php3/php3_list.h:1.8
--- php3/php3_list.h:1.7 Fri Jan 1 12:58:51 1999
+++ php3/php3_list.h Sun Dec 26 13:44:40 1999
@@ -29,15 +29,13 @@
*/
-/* $Id: php3_list.h,v 1.7 1999/01/01 17:58:51 zeev Exp $ */
+/* $Id: php3_list.h,v 1.8 1999/12/26 18:44:40 rasmus Exp $ */
#ifndef _LIST_H
#define _LIST_H
-#ifndef THREAD_SAFE
extern HashTable list_destructors;
-#endif
typedef struct {
void *ptr;
Index: php3/php3_realpath.c
diff -u php3/php3_realpath.c:1.12 php3/php3_realpath.c:1.13
--- php3/php3_realpath.c:1.12 Wed Jun 16 07:34:13 1999
+++ php3/php3_realpath.c Sun Dec 26 13:44:40 1999
@@ -27,12 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php3_realpath.c,v 1.12 1999/06/16 11:34:13 ssb Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
+/* $Id: php3_realpath.c,v 1.13 1999/12/26 18:44:40 rasmus Exp $ */
#include "php.h"
#ifdef HAVE_UNISTD_H
Index: php3/request_info.c
diff -u php3/request_info.c:1.41 php3/request_info.c:1.42
--- php3/request_info.c:1.41 Fri Jan 1 12:58:52 1999
+++ php3/request_info.c Sun Dec 26 13:44:40 1999
@@ -27,15 +27,10 @@
+----------------------------------------------------------------------+
*/
-/* $Id: request_info.c,v 1.41 1999/01/01 17:58:52 zeev Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: request_info.c,v 1.42 1999/12/26 18:44:40 rasmus Exp $ */
#include "php.h"
-#ifndef THREAD_SAFE
php3_request_info request_info;
-#endif
#if CGI_BINARY
int php3_init_request_info(void *conf)
Index: php3/request_info.h
diff -u php3/request_info.h:1.17 php3/request_info.h:1.18
--- php3/request_info.h:1.17 Fri Jan 1 12:58:52 1999
+++ php3/request_info.h Sun Dec 26 13:44:40 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: request_info.h,v 1.17 1999/01/01 17:58:52 zeev Exp $ */
+/* $Id: request_info.h,v 1.18 1999/12/26 18:44:40 rasmus Exp $ */
#ifndef _REQUEST_INFO_H_
#define _REQUEST_INFO_H_
@@ -48,9 +48,7 @@
char *php_argv0;
} php3_request_info;
-#ifndef THREAD_SAFE
extern php3_request_info request_info;
-#endif
extern int php3_init_request_info(void *conf);
extern int php3_destroy_request_info(void *conf);
Index: php3/safe_mode.c
diff -u php3/safe_mode.c:1.28 php3/safe_mode.c:1.29
--- php3/safe_mode.c:1.28 Wed Jun 16 07:34:13 1999
+++ php3/safe_mode.c Sun Dec 26 13:44:40 1999
@@ -23,13 +23,10 @@
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
- | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+ | Authors: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: safe_mode.c,v 1.28 1999/06/16 11:34:13 ssb Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: safe_mode.c,v 1.29 1999/12/26 18:44:40 rasmus Exp $ */
#include "php.h"
#include <stdio.h>
Index: php3/tls.c
diff -u php3/tls.c:1.17 php3/tls.c:1.18
--- php3/tls.c:1.17 Fri Jan 1 12:58:52 1999
+++ php3/tls.c Sun Dec 26 13:44:40 1999
@@ -28,16 +28,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tls.c,v 1.17 1999/01/01 17:58:52 zeev Exp $ */
+/* $Id: tls.c,v 1.18 1999/12/26 18:44:40 rasmus Exp $ */
#include "tls.h"
-#if THREAD_SAFE
-/*This is indeed a global!*/
-DWORD TlsIndex;
-#else
php3_globals_struct *php3_globals;
-#endif
/* just copying from some samples, can replace this with
standard php error messaging */
@@ -54,63 +49,11 @@
called at dll load*/
int tls_startup(void){
-#if THREAD_SAFE
- if ((TlsIndex=TlsAlloc())==0xFFFFFFFF){
- return 0;
- }
-#else
php3_globals=malloc(sizeof(php3_globals));
-#endif
return 1;
}
/*called at dll unload*/
int tls_shutdown(void){
-#if THREAD_SAFE
- if (!TlsFree(TlsIndex)){
- return 0;
- }
-#else
free(php3_globals);
-#endif
return 1;
}
-
-#if THREAD_SAFE
-/*called at start of thread*/
-int tls_create(void){
- php3_globals_struct *php3_globals;
- php3_globals = (php3_globals_struct *) LocalAlloc(LPTR, sizeof(php3_globals_struct));
- if (! TlsSetValue(TlsIndex, (void *) php3_globals))
- ErrorExit("TlsSetValue error");
-
- return 1;
-}
-
-/*called at end of thread*/
-int tls_destroy(void){
- php3_globals_struct *php3_globals;
- php3_globals = TlsGetValue(TlsIndex);
- if (php3_globals != 0)
- LocalFree((HLOCAL) php3_globals);
- return 1;
-}
-
-#endif
-
-
-/*
-accessing data inside a thread
-This short function shows how the global struct
-is accessed in a function. THREAD_SAFE should
-only need to be defined on windows server modules
-
-void thread_safe_access_of_globals(VOID)
-{
- TLS_VARS;
-
- if ((php3_globals == 0) && (GetLastError() != 0)) {
- ErrorExit("TlsGetValue error");
- }
-}
-
-*/
Index: php3/tls.h
diff -u php3/tls.h:1.63 php3/tls.h:1.64
--- php3/tls.h:1.63 Thu Oct 7 18:16:57 1999
+++ php3/tls.h Sun Dec 26 13:44:40 1999
@@ -28,7 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tls.h,v 1.63 1999/10/07 22:16:57 jah Exp $ */
+/* $Id: tls.h,v 1.64 1999/12/26 18:44:40 rasmus Exp $ */
#ifndef _TLS_H_
#define _TLS_H_
@@ -219,35 +219,7 @@
we should include their globals here.*/
} php3_globals_struct;
-#ifdef THREAD_SAFE
-extern DWORD TlsIndex;
-
-extern int tls_create(void);
-extern int tls_destroy(void);
-
-/* these are from the flex scanner */
-#ifndef YY_TLS_VARS
-#define phptext php_gbl->text
-#define phpleng php_gbl->leng
-extern DWORD phpLexTlsIndex;
-#define YY_TLS_VARS flex_globals *php_gbl = TlsGetValue(phpLexTlsIndex)
-#endif
-
-/* needed for control structure */
-extern int include_file(pval *file,int display_source);
-extern int conditional_include_file(pval *file, pval *return_offset INLINE_TLS);
-extern void initialize_input_file_buffer(FILE *f);
-extern void eval_string(pval *str, pval *return_offset, int display_source INLINE_TLS);
-
-/* Other needed defines */
-#if !defined(COMPILE_DL)
-extern int phplex(pval *phplval, struct php3_global_struct *php3_globals, flex_globals *php_gbl);
-extern int read_next_token(TokenCacheManager *tcm, Token **token, pval *phplval, struct
php3_global_struct *php3_globals, flex_globals *php_gbl);
-#endif
-#else
extern php3_globals_struct *php3_globals;
-
-#endif
extern int tls_startup(void);
extern int tls_shutdown(void);
Index: php3/token_cache.c
diff -u php3/token_cache.c:1.93 php3/token_cache.c:1.94
--- php3/token_cache.c:1.93 Fri Jan 1 12:58:52 1999
+++ php3/token_cache.c Sun Dec 26 13:44:40 1999
@@ -29,14 +29,10 @@
*/
-/* $Id: token_cache.c,v 1.93 1999/01/01 17:58:52 zeev Exp $ */
+/* $Id: token_cache.c,v 1.94 1999/12/26 18:44:40 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#else
extern char *phptext;
extern int phpleng;
-#endif
#include "php.h"
#include "language-parser.tab.h"
@@ -51,11 +47,9 @@
#endif
#include <stdio.h>
-#ifndef THREAD_SAFE
extern pval phplval;
TokenCache *tc; /* active token cache */
-#endif
static int is_reserved_word(int token_type);
static int last_token_type;
@@ -122,13 +116,7 @@
}
}
-/*seems this is only called from phplex in main.c so doing a
-special call for thread safety should be ok here.*/
-#ifdef THREAD_SAFE
-int read_next_token(TokenCacheManager *tcm, Token **token, pval *phplval,struct php3_global_struct
*php3_globals, flex_globals *php_gbl)
-#else
int read_next_token(TokenCacheManager *tcm, Token **token, pval *phplval)
-#endif
{
/* YY_TLS_VARS;
TLS_VARS; */
Index: php3/token_cache.h
diff -u php3/token_cache.h:1.34 php3/token_cache.h:1.35
--- php3/token_cache.h:1.34 Fri Jan 1 12:58:52 1999
+++ php3/token_cache.h Sun Dec 26 13:44:40 1999
@@ -29,7 +29,7 @@
*/
-/* $Id: token_cache.h,v 1.34 1999/01/01 17:58:52 zeev Exp $ */
+/* $Id: token_cache.h,v 1.35 1999/12/26 18:44:40 rasmus Exp $ */
#ifndef _TOKEN_CACHE
@@ -72,9 +72,7 @@
extern int tcm_init(TokenCacheManager *tcm);
extern int tc_init(TokenCache *tc,int block_size);
-#ifndef THREAD_SAFE
extern int read_next_token(TokenCacheManager *tcm, Token **token, pval *phplval);
-#endif
extern int seek_token(TokenCacheManager *tcm, int offset, int *yychar);
extern int tc_switch(TokenCacheManager *tcm, int start, int end, int middle);
extern inline int tc_set_token(TokenCacheManager *tcm, int offset, int type);
Index: php3/variables.c
diff -u php3/variables.c:1.161 php3/variables.c:1.162
--- php3/variables.c:1.161 Fri Jul 2 12:41:51 1999
+++ php3/variables.c Sun Dec 26 13:44:40 1999
@@ -29,12 +29,7 @@
*/
-/* $Id: variables.c,v 1.161 1999/07/02 16:41:51 markonen Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
+/* $Id: variables.c,v 1.162 1999/12/26 18:44:40 rasmus Exp $ */
#include "php.h"
#if HAVE_STRING_H
#include <string.h>
Index: php3/dl/mssql/mssql.c
diff -u php3/dl/mssql/mssql.c:1.15 php3/dl/mssql/mssql.c:1.16
--- php3/dl/mssql/mssql.c:1.15 Mon Mar 15 16:43:14 1999
+++ php3/dl/mssql/mssql.c Sun Dec 26 13:44:42 1999
@@ -32,18 +32,8 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mssql.c,v 1.15 1999/03/15 21:43:14 fmk Exp $ */
+/* $Id: mssql.c,v 1.16 1999/12/26 18:44:42 rasmus Exp $ */
#define IS_EXT_MODULE
-#ifdef THREAD_SAFE
-# ifndef PHP_31
-# undef THREAD_SAFE /*no need in 3.0*/
-# else
-# include "tls.h"
- DWORD mssqltls;
- static int numthreads=0;
- void *mssql_mutex;
-# endif
-#endif
#if !(WIN32|WINNT)
#include "config.h"
@@ -57,11 +47,7 @@
#if HAVE_MSSQL
#define SAFE_STRING(s) ((s)?(s):"")
-#if PHP_31
-#include "ext/standard/php3_string.h"
-#else
#include "functions/php3_string.h"
-#endif
#include "php3_list.h"
#if BROKEN_MSSQL_PCONNECTS
@@ -102,18 +88,9 @@
#endif
-#if defined(THREAD_SAFE)
-
-#define msSQL_GLOBAL(a) php3_mssql_module->a
-
-#define msSQL_TLS_VARS \
- mssql_module *php3_mssql_module=TlsGetValue(mssqltls)
-
-#else
#define msSQL_GLOBAL(a) php3_mssql_module.a
#define msSQL_TLS_VARS
mssql_module php3_mssql_module;
-#endif
@@ -218,26 +195,8 @@
int php3_minit_mssql(INIT_FUNC_ARGS)
{
-// char *interface_file;
+/* char *interface_file; */
long compatability_mode,connecttimeout;
-#if defined(THREAD_SAFE)
- mssql_module *php3_mssql_module;
- PHP3_MUTEX_ALLOC(mssql_mutex);
- PHP3_MUTEX_LOCK(mssql_mutex);
- numthreads++;
- if (numthreads==1){
- if (!PHP3_TLS_PROC_STARTUP(mssqltls)){
- PHP3_MUTEX_UNLOCK(mssql_mutex);
- PHP3_MUTEX_FREE(mssql_mutex);
- return FAILURE;
- }
- }
- PHP3_MUTEX_UNLOCK(mssql_mutex);
- if(!PHP3_TLS_THREAD_INIT(mssqltls,php3_mssql_module,mssql_module)){
- PHP3_MUTEX_FREE(mssql_mutex);
- return FAILURE;
- }
-#endif
if (dbinit()==FAIL) {
return FAILURE;
@@ -312,18 +271,6 @@
int php3_mshutdown_mssql(void)
{
msSQL_TLS_VARS;
-#ifdef THREAD_SAFE
- PHP3_TLS_THREAD_FREE(php3_mssql_module);
- PHP3_MUTEX_LOCK(mssql_mutex);
- numthreads--;
- if (numthreads<1) {
- PHP3_TLS_PROC_SHUTDOWN(mssqltls);
- PHP3_MUTEX_UNLOCK(mssql_mutex);
- PHP3_MUTEX_FREE(mssql_mutex);
- return SUCCESS;
- }
- PHP3_MUTEX_UNLOCK(mssql_mutex);
-#endif
dbexit();
return SUCCESS;
}
@@ -539,11 +486,7 @@
int type,link;
void *ptr;
-#ifdef THREAD_SAFE
- if (index_ptr->type != _php3_le_index_ptr()) {
-#else
if (index_ptr->type != le_index_ptr) {
-#endif
RETURN_FALSE;
}
link = (int) index_ptr->ptr;
@@ -605,11 +548,7 @@
/* add it to the hash */
new_index_ptr.ptr = (void *) return_value->value.lval;
-#ifdef THREAD_SAFE
- new_index_ptr.type = _php3_le_index_ptr();
-#else
new_index_ptr.type = le_index_ptr;
-#endif
if (_php3_hash_update(list,hashed_details,hashed_details_length+1,(void *) &new_index_ptr,
sizeof(list_entry),NULL)==FAILURE) {
efree(hashed_details);
RETURN_FALSE;
Index: php3/dl/mssql/php3_mssql.h
diff -u php3/dl/mssql/php3_mssql.h:1.3 php3/dl/mssql/php3_mssql.h:1.4
--- php3/dl/mssql/php3_mssql.h:1.3 Wed Jan 6 02:27:12 1999
+++ php3/dl/mssql/php3_mssql.h Sun Dec 26 13:44:43 1999
@@ -28,7 +28,7 @@
*/
-/* $Id: php3_mssql.h,v 1.3 1999/01/06 07:27:12 fmk Exp $ */
+/* $Id: php3_mssql.h,v 1.4 1999/12/26 18:44:43 rasmus Exp $ */
#ifndef _PHP3_MSSQL_H
#define _PHP3_MSSQL_H
@@ -137,9 +137,7 @@
int num_rows,num_fields;
} mssql_result;
-#ifndef THREAD_SAFE
extern mssql_module php3_mssql_module;
-#endif
#else
Index: php3/functions/apache.c
diff -u php3/functions/apache.c:1.50 php3/functions/apache.c:1.51
--- php3/functions/apache.c:1.50 Fri Sep 17 11:47:48 1999
+++ php3/functions/apache.c Sun Dec 26 13:44:43 1999
@@ -29,10 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: apache.c,v 1.50 1999/09/17 15:47:48 coar Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: apache.c,v 1.51 1999/12/26 18:44:43 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "functions/head.h"
Index: php3/functions/aspell.c
diff -u php3/functions/aspell.c:1.4 php3/functions/aspell.c:1.5
--- php3/functions/aspell.c:1.4 Mon Nov 22 17:26:04 1999
+++ php3/functions/aspell.c Sun Dec 26 13:44:43 1999
@@ -28,14 +28,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id: aspell.c,v 1.4 1999/11/22 22:26:04 eschmid Exp $ */
+/* $Id: aspell.c,v 1.5 1999/12/26 18:44:43 rasmus Exp $ */
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h"
#ifndef MSVC5
#include "build-defs.h"
Index: php3/functions/base64.c
diff -u php3/functions/base64.c:1.30 php3/functions/base64.c:1.31
--- php3/functions/base64.c:1.30 Thu Jun 24 13:06:40 1999
+++ php3/functions/base64.c Sun Dec 26 13:44:43 1999
@@ -26,11 +26,8 @@
| Author: Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
-/* $Id: base64.c,v 1.30 1999/06/24 17:06:40 sas Exp $ */
+/* $Id: base64.c,v 1.31 1999/12/26 18:44:43 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include <string.h>
#include "php.h"
Index: php3/functions/basic_functions.c
diff -u php3/functions/basic_functions.c:1.281 php3/functions/basic_functions.c:1.282
--- php3/functions/basic_functions.c:1.281 Sat Oct 30 20:24:08 1999
+++ php3/functions/basic_functions.c Sun Dec 26 13:44:43 1999
@@ -28,10 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.281 1999/10/31 00:24:08 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: basic_functions.c,v 1.282 1999/12/26 18:44:43 rasmus Exp $ */
#include "php.h"
#include "modules.h"
#include "internal_functions.h"
Index: php3/functions/bcmath.c
diff -u php3/functions/bcmath.c:1.29 php3/functions/bcmath.c:1.30
--- php3/functions/bcmath.c:1.29 Sat Jan 30 15:46:49 1999
+++ php3/functions/bcmath.c Sun Dec 26 13:44:44 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: bcmath.c,v 1.29 1999/01/30 20:46:49 rasmus Exp $ */
+/* $Id: bcmath.c,v 1.30 1999/12/26 18:44:44 rasmus Exp $ */
#ifndef MSVC5
#include "config.h"
#include "build-defs.h"
@@ -63,9 +63,7 @@
php3_module_entry *get_module() { return &bcmath_module_entry; };
#endif
-#ifndef THREAD_SAFE
static long bc_precision;
-#endif
int php3_rinit_bcmath(INIT_FUNC_ARGS)
{
Index: php3/functions/browscap.c
diff -u php3/functions/browscap.c:1.22 php3/functions/browscap.c:1.23
--- php3/functions/browscap.c:1.22 Mon Jan 4 09:25:19 1999
+++ php3/functions/browscap.c Sun Dec 26 13:44:44 1999
@@ -27,19 +27,14 @@
+----------------------------------------------------------------------+
*/
-/* $Id: browscap.c,v 1.22 1999/01/04 14:25:19 jah Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: browscap.c,v 1.23 1999/12/26 18:44:44 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "php3_browscap.h"
-#ifndef THREAD_SAFE
HashTable browser_hash;
static char *lookup_browser_name;
static pval *found_browser_entry;
-#endif
function_entry browscap_functions[] = {
{"get_browser", php3_get_browser, NULL},
Index: php3/functions/cpdf.c
diff -u php3/functions/cpdf.c:1.20 php3/functions/cpdf.c:1.21
--- php3/functions/cpdf.c:1.20 Sun Nov 21 03:10:21 1999
+++ php3/functions/cpdf.c Sun Dec 26 13:44:45 1999
@@ -27,17 +27,13 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cpdf.c,v 1.20 1999/11/21 08:10:21 eschmid Exp $ */
+/* $Id: cpdf.c,v 1.21 1999/12/26 18:44:45 rasmus Exp $ */
/* cpdflib.h -- C language API definitions for ClibPDF library
* Copyright (C) 1998 FastIO Systems, All Rights Reserved.
*/
/* Note that there is no code from the cpdflib package in this file */
-#if !PHP_31 && defined(THREAD_SAFE)
-#undef THREAD_SAFE
-#endif
-
#include "php.h"
#include "internal_functions.h"
#include "php3_list.h"
@@ -58,24 +54,10 @@
#if HAVE_CPDFLIB
-#ifdef THREAD_SAFE
-DWORD CPDFlibTls;
-static int numthreads=0;
-
-typedef struct cpdflib_global_struct{
- int le_cpdf;
- int le_outline;
-} cpdflib_global_struct;
-
-# define CPDF_GLOBAL(a) cpdflib_globals->a
-# define CPDF_TLS_VARS cpdflib_global_struct *cpdflib_globals=TlsGetValue(CPDFlibTls)
-
-#else
# define CPDF_GLOBAL(a) a
# define CPDF_TLS_VARS
static int le_cpdf;
static int le_outline;
-#endif
function_entry cpdf_functions[] = {
{"cpdf_set_creator", php3_cpdf_set_creator, NULL},
Index: php3/functions/datetime.c
diff -u php3/functions/datetime.c:1.76 php3/functions/datetime.c:1.77
--- php3/functions/datetime.c:1.76 Thu Oct 7 19:00:44 1999
+++ php3/functions/datetime.c Sun Dec 26 13:44:45 1999
@@ -28,14 +28,7 @@
| Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
-
-
-/* $Id: datetime.c,v 1.76 1999/10/07 23:00:44 jah Exp $ */
-
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: datetime.c,v 1.77 1999/12/26 18:44:45 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "operators.h"
Index: php3/functions/dav.c
diff -u php3/functions/dav.c:1.8 php3/functions/dav.c:1.9
--- php3/functions/dav.c:1.8 Mon Nov 22 17:26:04 1999
+++ php3/functions/dav.c Sun Dec 26 13:44:45 1999
@@ -27,57 +27,30 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dav.c,v 1.8 1999/11/22 22:26:04 eschmid Exp $ */
+/* $Id: dav.c,v 1.9 1999/12/26 18:44:45 rasmus Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
-# if PHP_31
-# include "../phpdl.h"
-# else
# include "dl/phpdl.h"
-# endif
#endif
#include "php.h"
#include "internal_functions.h"
#include "php3_dav.h"
-#if defined(THREAD_SAFE) && !PHP_31
-# undef THREAD_SAFE
-#endif
-
#if HAVE_MOD_DAV
# include "php3_dav.h"
# include "variables.h"
-/* {{{ thread safety stuff */
+#define DAV_GLOBAL(a) a
+#define DAV_TLS_VARS
-# ifdef THREAD_SAFE
-# define DAV_GLOBAL(a) phpdav_globals->a
-# define DAV_TLS_VARS phpdav_global_struct *phpdav_globals = TlsGetValue(PHPDAVTls);
-
-void *phpdav_mutex;
-DWORD PHPDAVTls;
-static int numthreads=0;
-
-typedef struct phpdav_global_struct {
- phpdav_module php3_dav_module;
-} phpdav_global_struct;
-
-# else /* !defined(THREAD_SAFE) */
-# define DAV_GLOBAL(a) a
-# define DAV_TLS_VARS
-
phpdav_module php3_dav_module;
-# endif /* defined(THREAD_SAFE) */
-
# define DAV_HANDLER(a) DAV_GLOBAL(php3_dav_module).a##_handler
# define DAV_SET_HANDLER(a,b) \
dav_set_handler(&DAV_GLOBAL(php3_dav_module).a##_handler,(b))
-
-/* }}} */
/* {{{ dynamically loadable module stuff */
# if COMPILE_DL
@@ -119,24 +92,6 @@
int php3_minit_phpdav(INIT_FUNC_ARGS)
{
-#if defined(THREAD_SAFE)
- phpdav_global_struct *phpdav_globals;
- PHP3_MUTEX_ALLOC(phpdav_mutex);
- PHP3_MUTEX_LOCK(phpdav_mutex);
- numthreads++;
- if (numthreads==1){
- if (!PHP3_TLS_PROC_STARTUP(PHPDAVTls)){
- PHP3_MUTEX_UNLOCK(phpdav_mutex);
- PHP3_MUTEX_FREE(phpdav_mutex);
- return FAILURE;
- }
- }
- PHP3_MUTEX_UNLOCK(phdpav_mutex);
- if(!PHP3_TLS_THREAD_INIT(PHPDAVTls,phpdav_globals,phpdav_global_struct)){
- PHP3_MUTEX_FREE(phpdav_mutex);
- return FAILURE;
- }
-#endif
return SUCCESS;
}
@@ -154,18 +109,6 @@
int php3_mshutdown_phpdav()
{
DAV_TLS_VARS;
-#ifdef THREAD_SAFE
- PHP3_TLS_THREAD_FREE(phpdav_globals);
- PHP3_MUTEX_LOCK(phpdav_mutex);
- numthreads--;
- if (numthreads < 1) {
- PHP3_TLS_PROC_SHUTDOWN(PHPDAVTls);
- PHP3_MUTEX_UNLOCK(phpdav_mutex);
- PHP3_MUTEX_FREE(phpdav_mutex);
- return SUCCESS;
- }
- PHP3_MUTEX_UNLOCK(phpdav_mutex);
-#endif
return SUCCESS;
}
Index: php3/functions/db.c
diff -u php3/functions/db.c:1.92 php3/functions/db.c:1.93
--- php3/functions/db.c:1.92 Sun Jun 20 14:11:43 1999
+++ php3/functions/db.c Sun Dec 26 13:44:45 1999
@@ -28,18 +28,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id: db.c,v 1.92 1999/06/20 18:11:43 jim Exp $ */
+/* $Id: db.c,v 1.93 1999/12/26 18:44:45 rasmus Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
-#ifdef PHP_31
-# include "../phpdl.h"
-#else
-# ifdef THREAD_SAFE
-# undef THREAD_SAFE
-# endif
# include "dl/phpdl.h"
#endif
-#endif
#include "php.h"
#include "php_compat.h"
@@ -157,30 +150,12 @@
datum flatfile_nextkey(FILE *dbf);
#endif
-#ifdef PHP_31
-#include "php3_db.h"
-#include "ext/standard/php3_string.h"
-#else
#include "functions/db.h"
#include "functions/php3_string.h"
-#endif
-#if THREAD_SAFE
-DWORD DbmTls;
-static int numthreads=0;
-
-typedef struct dbm_global_struct{
- int le_db;
-}dbm_global_struct;
-
-#define DBM_GLOBAL(a) dbm_globals->a
-#define DBM_TLS_VARS dbm_global_struct *dbm_globals = TlsGetValue(DbmTls);
-
-#else
static int le_db;
#define DBM_GLOBAL(a) a
#define DBM_TLS_VARS
-#endif
/*needed for blocking calls in windows*/
void *dbm_mutex;
@@ -311,11 +286,9 @@
return NULL;
}
-#ifndef PHP_31 /* FIXME php3_ini cannot be accessed in modules */
if (php3_ini.safe_mode && (!_php3_checkuid(filename, 2))) {
return NULL;
}
-#endif
if (_php3_check_open_basedir(filename)) {
return NULL;
@@ -566,12 +539,10 @@
int ret;
datum key_datum, value_datum;
-#ifndef PHP_31 /* FIXME php3_ini cannot be accessed in modules */
if (php3_ini.magic_quotes_runtime) {
_php3_stripslashes(key,NULL);
_php3_stripslashes(value,NULL);
}
-#endif
value_datum.dptr = estrdup(value);
value_datum.dsize = strlen(value);
@@ -662,11 +633,9 @@
else
ret = NULL;
-#ifndef PHP_31 /* FIXME php3_ini cannot be accessed in modules */
if (ret && php3_ini.magic_quotes_runtime) {
ret = _php3_addslashes(ret, value_datum.dsize, NULL, 1);
}
-#endif
return(ret);
}
@@ -890,11 +859,9 @@
}
else ret=NULL;
-#ifndef PHP_31 /* FIXME php3_ini cannot be accessed in modules */
if (ret && php3_ini.magic_quotes_runtime) {
ret = _php3_addslashes(ret, ret_datum.dsize, NULL, 1);
}
-#endif
return(ret);
}
@@ -1127,43 +1094,12 @@
int php3_minit_db(INIT_FUNC_ARGS)
{
-#if defined(THREAD_SAFE)
- dbm_global_struct *dbm_globals;
- PHP3_MUTEX_ALLOC(dbm_mutex);
- PHP3_MUTEX_LOCK(dbm_mutex);
- numthreads++;
- if (numthreads==1){
- if (!PHP3_TLS_PROC_STARTUP(DbmTls)){
- PHP3_MUTEX_UNLOCK(dbm_mutex);
- PHP3_MUTEX_FREE(dbm_mutex);
- return FAILURE;
- }
- }
- PHP3_MUTEX_UNLOCK(dbm_mutex);
- if(!PHP3_TLS_THREAD_INIT(DbmTls,dbm_globals,dbm_global_struct)){
- PHP3_MUTEX_FREE(dbm_mutex);
- return FAILURE;
- }
-#endif
-
DBM_GLOBAL(le_db) = register_list_destructors(_php3_dbmclose,NULL);
return SUCCESS;
}
static int php3_mend_db(void){
DBM_TLS_VARS;
-#ifdef THREAD_SAFE
- PHP3_TLS_THREAD_FREE(dbm_globals);
- PHP3_MUTEX_LOCK(dbm_mutex);
- numthreads--;
- if (numthreads<1) {
- PHP3_TLS_PROC_SHUTDOWN(DbmTls);
- PHP3_MUTEX_UNLOCK(dbm_mutex);
- PHP3_MUTEX_FREE(dbm_mutex);
- return SUCCESS;
- }
- PHP3_MUTEX_UNLOCK(dbm_mutex);
-#endif
return SUCCESS;
}
Index: php3/functions/dbase.c
diff -u php3/functions/dbase.c:1.75 php3/functions/dbase.c:1.76
--- php3/functions/dbase.c:1.75 Fri Jun 25 18:48:30 1999
+++ php3/functions/dbase.c Sun Dec 26 13:44:45 1999
@@ -27,14 +27,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dbase.c,v 1.75 1999/06/25 22:48:30 sas Exp $ */
+/* $Id: dbase.c,v 1.76 1999/12/26 18:44:45 rasmus Exp $ */
#if defined(COMPILE_DL)
#include "dl/phpdl.h"
#endif
-#if defined(THREAD_SAFE)
-#include "tls.h"
-#endif
#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
@@ -50,26 +47,9 @@
#if DBASE
#include "dbase.h"
#include "../dbase/dbf.h"
-#if defined(THREAD_SAFE)
-DWORD DbaseTls;
-static int numthreads=0;
-void *dbase_mutex;
-
-typedef struct dbase_global_struct{
- int le_dbhead;
-}dbase_global_struct;
-
-#define DBase_GLOBAL(a) dbase_globals->a
-
-#define DBase_TLS_VARS \
- dbase_global_struct *dbase_globals; \
- dbase_globals=TlsGetValue(DbaseTls);
-
-#else
static int le_dbhead;
#define DBase_GLOBAL(a) a
#define DBase_TLS_VARS
-#endif
#include <fcntl.h>
#include <errno.h>
@@ -84,43 +64,11 @@
int php3_minit_dbase(INIT_FUNC_ARGS)
{
-#if defined(THREAD_SAFE)
- dbase_global_struct *dbase_globals;
-#if !defined(COMPILE_DL)
- CREATE_MUTEX(dbase_mutex,"DBase_TLS");
- SET_MUTEX(dbase_mutex);
- numthreads++;
- if (numthreads==1){
- if ((DbaseTls=TlsAlloc())==0xFFFFFFFF){
- FREE_MUTEX(dbase_mutex);
- return 0;
- }}
- FREE_MUTEX(dbase_mutex);
-#endif
- dbase_globals = (dbase_global_struct *) LocalAlloc(LPTR, sizeof(dbase_global_struct));
- TlsSetValue(DbaseTls, (void *) dbase_globals);
-#endif
DBase_GLOBAL(le_dbhead) = register_list_destructors(_close_dbase,NULL);
return SUCCESS;
}
static int php3_mend_dbase(void){
-#if defined(THREAD_SAFE)
- dbase_global_struct *dbase_globals;
- dbase_globals = TlsGetValue(DbaseTls);
- if (dbase_globals != 0)
- LocalFree((HLOCAL) dbase_globals);
-#if !defined(COMPILE_DL)
- SET_MUTEX(dbase_mutex);
- numthreads--;
- if (!numthreads){
- if (!TlsFree(DbaseTls)){
- FREE_MUTEX(dbase_mutex);
- return 0;
- }}
- FREE_MUTEX(dbase_mutex);
-#endif
-#endif
return SUCCESS;
}
@@ -746,18 +694,6 @@
#if defined(COMPILE_DL)
DLEXPORT php3_module_entry *get_module(void) { return &dbase_module_entry; }
-
-#if (WIN32|WINNT) && defined(THREAD_SAFE)
-
-/*NOTE: You should have an odbc.def file where you
-export DllMain*/
-BOOL WINAPI DllMain(HANDLE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved)
-{
- return 1;
-}
-#endif
#endif
#endif
Index: php3/functions/dir.c
diff -u php3/functions/dir.c:1.59 php3/functions/dir.c:1.60
--- php3/functions/dir.c:1.59 Wed Jun 16 07:34:18 1999
+++ php3/functions/dir.c Sun Dec 26 13:44:45 1999
@@ -27,11 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dir.c,v 1.59 1999/06/16 11:34:18 ssb Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: dir.c,v 1.60 1999/12/26 18:44:45 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "fopen-wrappers.h"
@@ -56,10 +52,8 @@
#include "win32/readdir.h"
#endif
-#ifndef THREAD_SAFE
static int dirp_id = 0;
static int le_dirp;
-#endif
function_entry php3_dir_functions[] = {
{"opendir", php3_opendir, NULL},
Index: php3/functions/dl.c
diff -u php3/functions/dl.c:1.101 php3/functions/dl.c:1.102
--- php3/functions/dl.c:1.101 Fri Jan 1 12:59:08 1999
+++ php3/functions/dl.c Sun Dec 26 13:44:45 1999
@@ -29,10 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dl.c,v 1.101 1999/01/01 17:59:08 zeev Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: dl.c,v 1.102 1999/12/26 18:44:45 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "dl.h"
Index: php3/functions/dns.c
diff -u php3/functions/dns.c:1.57 php3/functions/dns.c:1.58
--- php3/functions/dns.c:1.57 Tue Jul 13 19:12:39 1999
+++ php3/functions/dns.c Sun Dec 26 13:44:45 1999
@@ -28,11 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dns.c,v 1.57 1999/07/13 23:12:39 jim Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: dns.c,v 1.58 1999/12/26 18:44:45 rasmus Exp $ */
#include "php.h"
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
Index: php3/functions/exec.c
diff -u php3/functions/exec.c:1.85 php3/functions/exec.c:1.86
--- php3/functions/exec.c:1.85 Mon Jul 19 16:55:41 1999
+++ php3/functions/exec.c Sun Dec 26 13:44:45 1999
@@ -26,11 +26,7 @@
| Author: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
-/* $Id: exec.c,v 1.85 1999/07/19 20:55:41 gerdts Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: exec.c,v 1.86 1999/12/26 18:44:45 rasmus Exp $ */
#include <stdio.h>
#include "php.h"
#include <ctype.h>
Index: php3/functions/fdf.c
diff -u php3/functions/fdf.c:1.8 php3/functions/fdf.c:1.9
--- php3/functions/fdf.c:1.8 Tue Oct 5 09:28:45 1999
+++ php3/functions/fdf.c Sun Dec 26 13:44:45 1999
@@ -27,17 +27,13 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fdf.c,v 1.8 1999/10/05 13:28:45 steinm Exp $ */
+/* $Id: fdf.c,v 1.9 1999/12/26 18:44:45 rasmus Exp $ */
/* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html.
*/
/* Note that there is no code from the FdfTk lib in this file */
-#if !PHP_31 && defined(THREAD_SAFE)
-#undef THREAD_SAFE
-#endif
-
#include "php.h"
#include "internal_functions.h"
#include "php3_list.h"
@@ -57,23 +53,10 @@
#if HAVE_FDFLIB
-#ifdef THREAD_SAFE
-DWORD FDFlibTls;
-static int numthreads=0;
-
-typedef struct fdflib_global_struct{
- int le_fdf;
-} fdflib_global_struct;
-
-# define FDF_GLOBAL(a) fdflib_globals->a
-# define FDF_TLS_VARS fdflib_global_struct *fdflib_globals=TlsGetValue(FDFlibTls)
-
-#else
-# define FDF_GLOBAL(a) a
-# define FDF_TLS_VARS
+#define FDF_GLOBAL(a) a
+#define FDF_TLS_VARS
int le_fdf_info;
int le_fdf;
-#endif
function_entry fdf_functions[] = {
PHP_FE(fdf_open, NULL)
Index: php3/functions/fhttpd.c
diff -u php3/functions/fhttpd.c:1.10 php3/functions/fhttpd.c:1.11
--- php3/functions/fhttpd.c:1.10 Wed Jun 16 07:34:18 1999
+++ php3/functions/fhttpd.c Sun Dec 26 13:44:45 1999
@@ -27,10 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fhttpd.c,v 1.10 1999/06/16 11:34:18 ssb Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: fhttpd.c,v 1.11 1999/12/26 18:44:45 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
Index: php3/functions/file.c
diff -u php3/functions/file.c:1.227 php3/functions/file.c:1.228
--- php3/functions/file.c:1.227 Mon Nov 15 06:45:38 1999
+++ php3/functions/file.c Sun Dec 26 13:44:45 1999
@@ -26,10 +26,7 @@
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.227 1999/11/15 11:45:38 ssb Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: file.c,v 1.228 1999/12/26 18:44:45 rasmus Exp $ */
#include "php.h"
#include <stdio.h>
@@ -86,13 +83,11 @@
extern int fclose();
#endif
-#ifndef THREAD_SAFE
static int fgetss_state = 0;
int le_fp,le_pp;
int wsa_fp; /*to handle reading and writing to windows sockets*/
static int pclose_ret;
extern int le_uploads;
-#endif
#ifndef HAVE_TEMPNAM
/*
Index: php3/functions/filepro.c
diff -u php3/functions/filepro.c:1.39 php3/functions/filepro.c:1.40
--- php3/functions/filepro.c:1.39 Mon Jan 4 14:43:39 1999
+++ php3/functions/filepro.c Sun Dec 26 13:44:45 1999
@@ -34,11 +34,7 @@
*/
-/* $Id: filepro.c,v 1.39 1999/01/04 19:43:39 eschmid Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: filepro.c,v 1.40 1999/12/26 18:44:45 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "safe_mode.h"
@@ -61,51 +57,15 @@
struct fp_field *next;
} FP_FIELD;
-#ifdef THREAD_SAFE
-DWORD FPTls;
-static int numthreads=0;
-
-typedef struct fp_global_struct{
- char *fp_database;
- signed int fp_fcount;
- signed int fp_keysize;
- FP_FIELD *fp_fieldlist;
-}fp_global_struct;
-
-#define FP_GLOBAL(a) fp_globals->a
-
-#define FP_TLS_VARS \
- fp_global_struct *fp_globals; \
- fp_globals=TlsGetValue(FPTls);
-
-#else
#define FP_GLOBAL(a) a
#define FP_TLS_VARS
static char *fp_database = NULL; /* Database directory */
static signed int fp_fcount = -1; /* Column count */
static signed int fp_keysize = -1; /* Size of key records */
static FP_FIELD *fp_fieldlist = NULL; /* List of fields */
-#endif
-
int php3_minit_filepro(INIT_FUNC_ARGS)
{
-#ifdef THREAD_SAFE
- fp_global_struct *fp_globals;
-#if !COMPILE_DL
- CREATE_MUTEX(fp_mutex,"FP_TLS");
- SET_MUTEX(fp_mutex);
- numthreads++;
- if (numthreads==1){
- if ((FPTls=TlsAlloc())==0xFFFFFFFF){
- FREE_MUTEX(fp_mutex);
- return 0;
- }}
- FREE_MUTEX(fp_mutex);
-#endif
- fp_globals = (fp_global_struct *) LocalAlloc(LPTR, sizeof(fp_global_struct));
- TlsSetValue(FPTls, (void *) fp_globals);
-#endif
FP_GLOBAL(fp_database)=NULL;
FP_GLOBAL(fp_fcount)=-1;
FP_GLOBAL(fp_keysize)=-1;
@@ -115,22 +75,6 @@
}
int php3_mend_filepro(void){
-#ifdef THREAD_SAFE
- fp_global_struct *fp_globals;
- fp_globals = TlsGetValue(FPTls);
- if (fp_globals != 0)
- LocalFree((HLOCAL) fp_globals);
-#if !COMPILE_DL
- SET_MUTEX(fp_mutex);
- numthreads--;
- if (!numthreads){
- if (!TlsFree(FPTls)){
- FREE_MUTEX(fp_mutex);
- return 0;
- }}
- FREE_MUTEX(fp_mutex);
-#endif
-#endif
return SUCCESS;
}
@@ -154,33 +98,6 @@
#if COMPILE_DL
#include "dl/phpdl.h"
DLEXPORT php3_module_entry *get_module(void) { return &filepro_module_entry; }
-#if (WIN32|WINNT) && defined(THREAD_SAFE)
-
-/*NOTE: You should have an odbc.def file where you
-export DllMain*/
-BOOL WINAPI DllMain(HANDLE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved)
-{
- switch( ul_reason_for_call ) {
- case DLL_PROCESS_ATTACH:
- if ((FPTls=TlsAlloc())==0xFFFFFFFF){
- return 0;
- }
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
- break;
- case DLL_PROCESS_DETACH:
- if (!TlsFree(FPTls)){
- return 0;
- }
- break;
- }
- return 1;
-}
-#endif
#endif
/*
Index: php3/functions/filestat.c
diff -u php3/functions/filestat.c:1.92 php3/functions/filestat.c:1.93
--- php3/functions/filestat.c:1.92 Tue Aug 17 07:22:04 1999
+++ php3/functions/filestat.c Sun Dec 26 13:44:45 1999
@@ -27,10 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filestat.c,v 1.92 1999/08/17 11:22:04 thies Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: filestat.c,v 1.93 1999/12/26 18:44:45 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "safe_mode.h"
@@ -84,7 +81,6 @@
#include "php3_filestat.h"
-#ifndef THREAD_SAFE
static char *CurrentStatFile=NULL;
# if MSVC5
static unsigned int CurrentStatLength=0;
@@ -94,7 +90,6 @@
static struct stat sb;
#ifdef HAVE_SYMLINK
static struct stat lsb;
-#endif
#endif
#ifndef S_ISDIR
Index: php3/functions/formatted_print.c
diff -u php3/functions/formatted_print.c:1.51 php3/functions/formatted_print.c:1.52
--- php3/functions/formatted_print.c:1.51 Tue Aug 3 15:58:25 1999
+++ php3/functions/formatted_print.c Sun Dec 26 13:44:45 1999
@@ -27,11 +27,8 @@
+----------------------------------------------------------------------+
*/
-/* $Id: formatted_print.c,v 1.51 1999/08/03 19:58:25 rasmus Exp $ */
+/* $Id: formatted_print.c,v 1.52 1999/12/26 18:44:45 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h"
#include "internal_functions.h"
#include "head.h"
@@ -78,10 +75,7 @@
register int r2;
double fi, fj;
register char *p, *p1;
- /*THREADX*/
-#ifndef THREAD_SAFE
static char cvt_buf[NDIG];
-#endif
TLS_VARS;
if (ndigits >= NDIG - 1)
Index: php3/functions/fsock.c
diff -u php3/functions/fsock.c:1.133 php3/functions/fsock.c:1.134
--- php3/functions/fsock.c:1.133 Wed Jul 21 11:45:10 1999
+++ php3/functions/fsock.c Sun Dec 26 13:44:45 1999
@@ -27,10 +27,7 @@
| Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
-/* $Id: fsock.c,v 1.133 1999/07/21 15:45:10 sas Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: fsock.c,v 1.134 1999/12/26 18:44:45 rasmus Exp $ */
#include "php.h"
#include "php3_list.h"
#include "internal_functions.h"
@@ -76,9 +73,7 @@
#include "url.h"
#include "fsock.h"
-#ifndef THREAD_SAFE
extern int le_fp;
-#endif
#define FREE_SOCK if(socketd >= 0) close(socketd); efree(sock); if (key) efree(key)
@@ -122,10 +117,8 @@
"Socket functions", fsock_functions, php3_minit_fsock, php3_mshutdown_fsock, NULL,
php3_rshutdown_fsock, NULL, STANDARD_MODULE_PROPERTIES
};
-#ifndef THREAD_SAFE
static HashTable ht_keys;
static HashTable ht_socks;
-#endif
/* {{{ lookup_hostname */
@@ -705,10 +698,8 @@
static int php3_minit_fsock(INIT_FUNC_ARGS)
{
-#ifndef THREAD_SAFE
_php3_hash_init(&ht_keys, 0, NULL, NULL, 1);
_php3_hash_init(&ht_socks, 0, NULL, (void (*)(void *))_php3_msock_destroy, 1);
-#endif
return SUCCESS;
}
/* }}} */
@@ -716,10 +707,8 @@
static int php3_mshutdown_fsock(SHUTDOWN_FUNC_ARGS)
{
-#ifndef THREAD_SAFE
_php3_hash_destroy(&ht_socks);
_php3_hash_destroy(&ht_keys);
-#endif
php_cleanup_sockbuf(1);
return SUCCESS;
}
Index: php3/functions/gd.c
diff -u php3/functions/gd.c:1.136 php3/functions/gd.c:1.137
--- php3/functions/gd.c:1.136 Wed Nov 24 16:44:14 1999
+++ php3/functions/gd.c Sun Dec 26 13:44:45 1999
@@ -29,20 +29,13 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.136 1999/11/24 21:44:14 steffann Exp $ */
+/* $Id: gd.c,v 1.137 1999/12/26 18:44:45 rasmus Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
/* Note that there is no code from the gd package in this file */
#define IS_EXT_MODULE
-#ifdef THREAD_SAFE
-# ifndef PHP_31
-# undef THREAD_SAFE /*no need in 3.0*/
-# else
-# include "tls.h"
-# endif
-#endif
#include "php.h"
#include "internal_functions.h"
#include "php3_list.h"
@@ -66,11 +59,7 @@
#include <gdfontl.h> /* 4 Large font */
#include <gdfontg.h> /* 5 Giant font */
#if HAVE_LIBTTF|HAVE_LIBFREETYPE
-# if PHP_31
-# include "gdttf.h"
-# else
-# include "functions/gdttf.h"
-# endif
+# include "functions/gdttf.h"
#endif
#ifndef M_PI
@@ -80,28 +69,9 @@
#if HAVE_LIBTTF|HAVE_LIBFREETYPE
static void php3_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int);
#endif
-
-#ifdef THREAD_SAFE
-DWORD GDlibTls;
-static int numthreads=0;
-void *gdlib_mutex=NULL;
-
-typedef struct gdlib_global_struct{
- int le_gd;
- int le_gd_font;
-#if HAVE_LIBT1
- int le_ps_enc;
- int le_ps_font;
- gd_module php3_gd_module;
-#endif
-} gdlib_global_struct;
-
-# define GD_GLOBAL(a) gdlib_globals->a
-# define GD_TLS_VARS gdlib_global_struct *gdlib_globals = TlsGetValue(GDlibTls);
-#else
-# define GD_GLOBAL(a) a
-# define GD_TLS_VARS
+#define GD_GLOBAL(a) a
+#define GD_TLS_VARS
int le_gd;
int le_gd_font;
#if HAVE_LIBT1
@@ -109,7 +79,6 @@
int le_ps_font;
gd_module php3_gd_module;
#endif
-#endif
function_entry gd_functions[] = {
{"imagearc", php3_imagearc, NULL},
@@ -179,11 +148,7 @@
};
#if COMPILE_DL
-# if PHP_31
-# include "../phpdl.h"
-# else
-# include "dl/phpdl.h"
-# endif
+#include "dl/phpdl.h"
DLEXPORT php3_module_entry *get_module(void) { return &gd_module_entry; }
#endif
@@ -196,24 +161,6 @@
int php3_minit_gd(INIT_FUNC_ARGS)
{
-#if defined(THREAD_SAFE)
- gdlib_global_struct *gdlib_globals;
- PHP3_MUTEX_ALLOC(gdlib_mutex);
- PHP3_MUTEX_LOCK(gdlib_mutex);
- numthreads++;
- if (numthreads==1){
- if (!PHP3_TLS_PROC_STARTUP(GDlibTls)){
- PHP3_MUTEX_UNLOCK(gdlib_mutex);
- PHP3_MUTEX_FREE(gdlib_mutex);
- return FAILURE;
- }
- }
- PHP3_MUTEX_UNLOCK(gdlib_mutex);
- if(!PHP3_TLS_THREAD_INIT(GDlibTls,gdlib_globals,gdlib_global_struct)){
- PHP3_MUTEX_FREE(gdlib_mutex);
- return FAILURE;
- }
-#endif
GD_GLOBAL(le_gd) = register_list_destructors(php3i_destructor_gdImageDestroy, NULL);
GD_GLOBAL(le_gd_font) = register_list_destructors(php3_free_gd_font, NULL);
#if HAVE_LIBT1
@@ -263,18 +210,6 @@
int php3_mend_gd(void){
GD_TLS_VARS;
-#ifdef THREAD_SAFE
- PHP3_TLS_THREAD_FREE(gdlib_globals);
- PHP3_MUTEX_LOCK(gdlib_mutex);
- numthreads--;
- if (numthreads<1) {
- PHP3_TLS_PROC_SHUTDOWN(GDlibTls);
- PHP3_MUTEX_UNLOCK(gdlib_mutex);
- PHP3_MUTEX_FREE(gdlib_mutex);
- return SUCCESS;
- }
- PHP3_MUTEX_UNLOCK(gdlib_mutex);
-#endif
#if HAVE_LIBT1
T1_CloseLib();
#endif
Index: php3/functions/head.c
diff -u php3/functions/head.c:1.121 php3/functions/head.c:1.122
--- php3/functions/head.c:1.121 Sat Dec 25 08:57:23 1999
+++ php3/functions/head.c Sun Dec 26 13:44:45 1999
@@ -26,10 +26,7 @@
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
-/* $Id: head.c,v 1.121 1999/12/25 13:57:23 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: head.c,v 1.122 1999/12/26 18:44:45 rasmus Exp $ */
#include <stdio.h>
#include "php.h"
#include "internal_functions.h"
@@ -50,15 +47,11 @@
#include "safe_mode.h"
#include "url.h"
-
-/* need to figure out some nice way to get rid of these */
-#ifndef THREAD_SAFE
static int php3_HeaderPrinted = 0;
static int php3_PrintHeader = 1;
static CookieList *top = NULL;
static char *cont_type = NULL;
static int header_called = 0;
-#endif
void php3_PushCookieList(char *, char *, time_t, char *, char *, int);
CookieList *php3_PopCookieList(void);
Index: php3/functions/html.c
diff -u php3/functions/html.c:1.32 php3/functions/html.c:1.33
--- php3/functions/html.c:1.32 Tue Sep 28 13:51:56 1999
+++ php3/functions/html.c Sun Dec 26 13:44:45 1999
@@ -28,11 +28,8 @@
+----------------------------------------------------------------------+
*/
-/* $Id: html.c,v 1.32 1999/09/28 17:51:56 markonen Exp $ */
+/* $Id: html.c,v 1.33 1999/12/26 18:44:45 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h"
#include "internal_functions.h"
#include "reg.h"
Index: php3/functions/hw.c
diff -u php3/functions/hw.c:1.51 php3/functions/hw.c:1.52
--- php3/functions/hw.c:1.51 Tue Oct 26 05:18:32 1999
+++ php3/functions/hw.c Sun Dec 26 13:44:45 1999
@@ -23,16 +23,12 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hw.c,v 1.51 1999/10/26 09:18:32 steinm Exp $ */
+/* $Id: hw.c,v 1.52 1999/12/26 18:44:45 rasmus Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
#endif
-#if !PHP_31 && defined(THREAD_SAFE)
-#undef THREAD_SAFE
-#endif
-
#include "php.h"
#include "internal_functions.h"
#include "php3_list.h"
@@ -45,28 +41,11 @@
# undef palloc
# endif
#endif
-
-/* {{{ thread safety stuff (inspired by xml.c, I'm not quite sure what
- I'm doing here, U. Steinmann) */
-# ifdef THREAD_SAFE
-# define HW_GLOBAL(a) hw_globals->a
-# define HW_TLS_VARS hw_global_struct *hw_globals = TlsGetValue(HWTls);
-
-DWORD HWTls;
-static int numthreads=0;
-
-typedef struct hw_global_struct {
- hw_module php3_hw_module;
-} hw_global_struct;
-
-# else /* !defined(THREAD_SAFE) */
-# define HW_GLOBAL(a) a
-# define HW_TLS_VARS
+#define HW_GLOBAL(a) a
+#define HW_TLS_VARS
hw_module php3_hw_module;
-
-# endif /* defined(THREAD_SAFE) */
function_entry hw_functions[] = {
PHP_FE(hw_connect, NULL)
Index: php3/functions/ifx.ec
diff -u php3/functions/ifx.ec:1.45 php3/functions/ifx.ec:1.46
--- php3/functions/ifx.ec:1.45 Sat Aug 14 10:00:15 1999
+++ php3/functions/ifx.ec Sun Dec 26 13:44:45 1999
@@ -30,7 +30,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ifx.ec,v 1.45 1999/08/14 14:00:15 danny Exp $ */
+/* $Id: ifx.ec,v 1.46 1999/12/26 18:44:45 rasmus Exp $ */
/* -------------------------------------------------------------------
* if you want a function reference : "grep '^\*\*' ifx.ec" will give
@@ -127,12 +127,6 @@
#if defined(COMPILE_DL)
#include "dl/phpdl.h"
#endif
-#if defined(THREAD_SAFE)
-#include "tls.h"
-DWORD InformixTls;
-static int numthreads=0;
-void *ifx_mutex;
-#endif
#if WIN32|WINNT
#include <winsock.h>
@@ -283,22 +277,9 @@
#endif
-#if defined(THREAD_SAFE)
-typedef struct ifx_global_struct{
- ifx_module php3_ifx_module;
-}ifx_global_struct;
-
-#define Informix_GLOBAL(a) ifx_globals->a
-
-#define Informix_TLS_VARS \
- ifx_global_struct *ifx_globals; \
- ifx_globals=TlsGetValue(InformixTls);
-
-#else
#define Informix_GLOBAL(a) a
#define Informix_TLS_VARS
ifx_module php3_ifx_module;
-#endif
#define CHECK_LINK(link) { \
if (link==0) { \
@@ -424,22 +405,6 @@
int php3_minit_ifx(INIT_FUNC_ARGS)
{
-#if defined(THREAD_SAFE)
- ifx_global_struct *ifx_globals;
- CREATE_MUTEX(ifx_mutex,"Informix_TLS");
- SET_MUTEX(ifx_mutex);
- numthreads++;
- if (numthreads==1){
- if ((InformixTls=TlsAlloc())==0xFFFFFFFF){
- FREE_MUTEX(ifx_mutex);
- return 0;
- }
- }
- FREE_MUTEX(ifx_mutex);
- ifx_globals = (ifx_global_struct *)
- LocalAlloc(LPTR, sizeof(ifx_global_struct));
- TlsSetValue(InformixTls, (void *) ifx_globals);
-#endif
if (cfg_get_long("ifx.blobinfile",
&Informix_GLOBAL(php3_ifx_module).blobinfile)==FAILURE) {
@@ -534,20 +499,6 @@
int php3_mshutdown_ifx(void){
-#if defined(THREAD_SAFE)
- Informix_TLS_VARS;
- if (ifx_globals != 0)
- LocalFree((HLOCAL) ifx_globals);
- SET_MUTEX(ifx_mutex);
- numthreads--;
- if (!numthreads){
- if (!TlsFree(InformixTls)){
- FREE_MUTEX(ifx_mutex);
- return 0;
- }
- }
- FREE_MUTEX(ifx_mutex);
-#endif
return SUCCESS;
}
Index: php3/functions/imap.h
diff -u php3/functions/imap.h:1.13 php3/functions/imap.h:1.14
--- php3/functions/imap.h:1.13 Mon Dec 13 23:19:24 1999
+++ php3/functions/imap.h Sun Dec 26 13:44:46 1999
@@ -1,4 +1,4 @@
-/* $Id: imap.h,v 1.13 1999/12/14 04:19:24 musone Exp $ */
+/* $Id: imap.h,v 1.14 1999/12/26 18:44:46 rasmus Exp $ */
#ifndef _INCLUDED_IMAP_H
#define _INCLUDED_IMAP_H
@@ -10,9 +10,6 @@
#if HAVE_IMAP
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#ifndef MSVC5
#include "build-defs.h"
#endif
Index: php3/functions/imsp.h
diff -u php3/functions/imsp.h:1.1 php3/functions/imsp.h:1.2
--- php3/functions/imsp.h:1.1 Fri Aug 6 12:09:25 1999
+++ php3/functions/imsp.h Sun Dec 26 13:44:46 1999
@@ -1,4 +1,4 @@
-/* $Id: imsp.h,v 1.1 1999/08/06 16:09:25 chagenbu Exp $ */
+/* $Id: imsp.h,v 1.2 1999/12/26 18:44:46 rasmus Exp $ */
#ifndef _INCLUDED_IMSP_H
#define _INCLUDED_IMSP_H
@@ -10,9 +10,6 @@
#if HAVE_IMSP
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#ifndef MSVC5
#include "build-defs.h"
#endif
Index: php3/functions/info.c
diff -u php3/functions/info.c:1.79 php3/functions/info.c:1.80
--- php3/functions/info.c:1.79 Fri Dec 3 08:37:48 1999
+++ php3/functions/info.c Sun Dec 26 13:44:46 1999
@@ -28,11 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: info.c,v 1.79 1999/12/03 13:37:48 ssb Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: info.c,v 1.80 1999/12/26 18:44:46 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "head.h"
Index: php3/functions/interbase.c
diff -u php3/functions/interbase.c:1.21 php3/functions/interbase.c:1.22
--- php3/functions/interbase.c:1.21 Sun Nov 21 10:23:15 1999
+++ php3/functions/interbase.c Sun Dec 26 13:44:46 1999
@@ -28,7 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.21 1999/11/21 15:23:15 eschmid Exp $ */
+/* $Id: interbase.c,v 1.22 1999/12/26 18:44:46 rasmus Exp $ */
/* TODO: Arrays, roles?
A lot... */
@@ -51,11 +51,7 @@
#include "php3_interbase.h"
#if COMPILE_DL
-# if PHP_31
-# include "../phpdl.h"
-# else
-# include "dl/phpdl.h"
-# endif
+# include "dl/phpdl.h"
#endif
#if HAVE_IBASE
@@ -233,25 +229,9 @@
/* }}} */
-
-/* {{{ thread safety stuff */
-#if defined(THREAD_SAFE)
-typedef ibase_global_struct{
- ibase_module php3_ibase_module;
-} ibase_global_struct;
-
-#define IBASE_GLOBAL(a) ibase_globals->a
-
-#define IBASE_TLS_VARS \
- ibase_global_struct *ibase_globals; \
- ibase_globals=TlsGetValue(IBASETls);
-
-#else
#define IBASE_GLOBAL(a) a
#define IBASE_TLS_VARS
ibase_module php3_ibase_module;
-#endif
-/* }}} */
/* error handling ---------------------------- */
@@ -534,7 +514,7 @@
php3_printf(
"<table>"
- "<tr><td>Revision:</td><td>$Revision: 1.21
$</td></tr>\n"
+ "<tr><td>Revision:</td><td>$Revision: 1.22
$</td></tr>\n"
#ifdef COMPILE_DL
"<tr><td>Dynamic
module:</td><td>Yes</td></tr>\n"
#endif
@@ -740,11 +720,7 @@
if (_php3_hash_find(list,hashed_details,hashed_details_length+1,(void **)
&index_ptr)==SUCCESS) {
int type,xlink;
void *ptr;
-#ifdef THREAD_SAFE
- if (index_ptr->type != _php3_le_index_ptr()) {
-#else
if (index_ptr->type != le_index_ptr) {
-#endif
RETURN_FALSE;
}
xlink = (int) index_ptr->ptr;
@@ -782,11 +758,7 @@
/* add it to the hash */
new_index_ptr.ptr = (void *) return_value->value.lval;
-#ifdef THREAD_SAFE
- new_index_ptr.type = _php3_le_index_ptr();
-#else
new_index_ptr.type = le_index_ptr;
-#endif
if (_php3_hash_update(list,hashed_details,hashed_details_length+1,(void *) &new_index_ptr,
sizeof(list_entry), NULL)==FAILURE) {
efree(hashed_details);
RETURN_FALSE;
@@ -2554,13 +2526,8 @@
}
/* }}} */
-
-/* from file.c. I'm not sure, this variables always initialized? */
-#ifndef THREAD_SAFE
extern int le_fp,le_pp;
extern int wsa_fp; /*to handle reading and writing to windows sockets*/
-#endif
-
/* {{{ proto string ibase_blob_import([link_identifier,] file_id)
Create blob, copy file in it, and close it */
Index: php3/functions/ldap.c
diff -u php3/functions/ldap.c:1.75 php3/functions/ldap.c:1.76
--- php3/functions/ldap.c:1.75 Sun Nov 28 08:52:20 1999
+++ php3/functions/ldap.c Sun Dec 26 13:44:46 1999
@@ -25,22 +25,13 @@
+----------------------------------------------------------------------+
| Authors: Amitay Isaacs <amitay@w-o-i.com> |
| Eric Warnke <ericw@albany.edu> |
- | Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+ | Rasmus Lerdorf <rasmus@php.net> |
| Gerrit Thomson <334647@swin.edu.au> |
+----------------------------------------------------------------------+
*/
-/* $Id: ldap.c,v 1.75 1999/11/28 13:52:20 venaas Exp $ */
+/* $Id: ldap.c,v 1.76 1999/12/26 18:44:46 rasmus Exp $ */
#define IS_EXT_MODULE
-#if !PHP_31 && defined(THREAD_SAFE)
-#undef THREAD_SAFE
-#endif
-#ifdef THREAD_SAFE
-#include "tls.h"
-DWORD ldapTLS;
-static int numthreads=0;
-void *ldap_mutex;
-#endif
#if !(WIN32|WINNT)
#include "config.h"
@@ -51,14 +42,9 @@
#if HAVE_LDAP
#if COMPILE_DL
-#if PHP_31
-#include "ext/phpdl.h"
-#include "ext/standard/dl.h"
-#else
#include "dl/phpdl.h"
#include "functions/dl.h"
#endif
-#endif
#include "php3_list.h"
#include "php3_ldap.h"
@@ -75,25 +61,11 @@
#define __STDC__ 1
#endif
-#if PHP_31
-#include "ext/standard/php3_string.h"
-#else
#include "functions/php3_string.h"
-#endif
-
-#if THREAD_SAFE & HAVE_NSLDAP
-#include "php3_threads.h"
-/* Structure for LDAP error values */
-#define LDAP_TLS_VARS ldap_module *PHP3_TLS_GET(ldapTLS,php3_ldap_module)
-#define LDAP_GLOBAL(a) php3_ldap_module->a
-#else
#define LDAP_TLS_VARS
#define LDAP_GLOBAL(a) php3_ldap_module.a
ldap_module php3_ldap_module;
-#endif
-
-
/*
This is just a small subset of the functionality provided by the LDAP library. All the
@@ -150,55 +122,6 @@
DLEXPORT php3_module_entry *get_module(void ) { return &ldap_module_entry; }
#endif
-
-#if 0 /* see my note in php3_ldap.h. smc */
-/* Function for setting thread-specific LDAP error values */
-static void php3_ldap_set_ld_error( int err, char *matched, char *errmsg, void *dummy )
-{
- LDAP_TLS_VARS;
-
- /* Set the error code returned by the LDAP operation */
- LDAP_GLOBAL(le_errno) = err;
- /* Specify the components of the DN that matched (if
- an "NO_SUCH_OBJECT" error occurred */
- if ( LDAP_GLOBAL(le_matched) != NULL ) {
- ldap_memfree( LDAP_GLOBAL(le_matched) );
- }
- LDAP_GLOBAL(le_matched) = matched;
- /* Specify the error message corresponding to the error code */
- if ( LDAP_GLOBAL(le_errmsg) != NULL ) {
- ldap_memfree( LDAP_GLOBAL(le_errmsg) );
- }
- LDAP_GLOBAL(le_errmsg) = errmsg;
-}
-
-/* Function for getting the thread-specific LDAP error values */
-static int php3_ldap_get_ld_error( char **matched, char **errmsg, void *dummy )
-{
- LDAP_TLS_VARS;
- /* Retrieve the error values */
- if ( matched != NULL ) {
- *matched = LDAP_GLOBAL(le_matched);
- }
- if ( errmsg != NULL ) {
- *errmsg = LDAP_GLOBAL(le_errmsg);
- }
- return( LDAP_GLOBAL(le_errno) );
-}
-
-/* Function for setting the value of the errno variable */
-static void php3_ldap_set_errno( int err )
-{
- errno = err;
-}
-
-/* Function for getting the value of the errno variable */
-static int php3_ldap_get_errno( void )
-{
- return( errno );
-}
-#endif /* THREAD_SAFE && NSLDAP */
-
static void _close_ldap_link(LDAP *ld)
{
LDAP_TLS_VARS;
@@ -215,57 +138,6 @@
int php3_minit_ldap(INIT_FUNC_ARGS)
{
-#if defined(THREAD_SAFE)
- ldap_module *php3_ldap_module;
- PHP3_MUTEX_ALLOC(ldap_mutex);
- PHP3_MUTEX_LOCK(ldap_mutex);
- numthreads++;
- if (numthreads==1){
- if (!PHP3_TLS_PROC_STARTUP(ldapTLS)){
- PHP3_MUTEX_UNLOCK(ldap_mutex);
- PHP3_MUTEX_FREE(ldap_mutex);
- return 0;
- }
- }
- PHP3_MUTEX_UNLOCK(ldap_mutex);
- if(!PHP3_TLS_THREAD_INIT(ldapTLS,php3_ldap_module,ldap_module))
- return 0;
-#if 0 /*HAVE_NSLDAP*/
- /* Set up the ldap_thread_fns structure with pointers
- to the functions that you want called */
- memset( &LDAP_GLOBAL(tfns), '\0', sizeof(struct ldap_thread_fns) );
- /* Specify the functions that you want called */
- /* Call the my_mutex_alloc() function whenever mutexes
- need to be allocated */
- LDAP_GLOBAL(tfns).ltf_mutex_alloc = (void *(*)(void)) php3_mutex_alloc;
- /* Call the my_mutex_free() function whenever mutexes
- need to be destroyed */
- LDAP_GLOBAL(tfns).ltf_mutex_free = (void (*)(void *)) php3_mutex_free;
- /* Call the pthread_mutex_lock() function whenever a
- thread needs to lock a mutex. */
- LDAP_GLOBAL(tfns).ltf_mutex_lock = (int (*)(void *)) php3_mutex_lock;
- /* Call the pthread_mutex_unlock() function whenever a
- thread needs to unlock a mutex. */
- LDAP_GLOBAL(tfns).ltf_mutex_unlock = (int (*)(void *)) php3_mutex_unlock;
- /* Call the get_errno() function to get the value of errno */
- LDAP_GLOBAL(tfns).ltf_get_errno = php3_ldap_get_errno;
- /* Call the set_errno() function to set the value of errno */
- LDAP_GLOBAL(tfns).ltf_set_errno = php3_ldap_set_errno;
- /* Call the get_ld_error() function to get error values from
- calls to functions in the libldap library */
- LDAP_GLOBAL(tfns).ltf_get_lderrno = php3_ldap_get_ld_error;
- /* Call the set_ld_error() function to set error values for
- calls to functions in the libldap library */
- LDAP_GLOBAL(tfns).ltf_set_lderrno = php3_ldap_set_ld_error;
- /* Don't pass any extra parameter to the functions for
- getting and setting libldap function call errors */
- LDAP_GLOBAL(tfns).ltf_lderrno_arg = NULL;
-/* Set the session option that specifies the functions to call for multi-threaded clients */
- if (ldap_set_option( ld, LDAP_OPT_THREAD_FN_PTRS, (void *) &LDAP_GLOBAL(tfns))!= 0) {
- ldap_perror( ld, "ldap_set_option: thread pointers" );
- }
-#endif
-#endif
if (cfg_get_long("ldap.max_links", &LDAP_GLOBAL(max_links)) == FAILURE) {
LDAP_GLOBAL(max_links) = -1;
}
@@ -277,24 +149,12 @@
LDAP_GLOBAL(le_result) = register_list_destructors(_free_ldap_result, NULL);
LDAP_GLOBAL(le_link) = register_list_destructors(_close_ldap_link, NULL);
- /*FIXME is this safe in threaded environment? if so, please comment*/
ldap_module_entry.type = type;
return SUCCESS;
}
int php3_mshutdown_ldap(void){
-#ifdef THREAD_SAFE
- LDAP_TLS_VARS;
- PHP3_TLS_THREAD_FREE(php3_ldap_module);
- PHP3_MUTEX_LOCK(ldap_mutex);
- numthreads--;
- if (!numthreads) {
- PHP3_TLS_PROC_SHUTDOWN(ldapTLS);
- }
- PHP3_MUTEX_UNLOCK(ldap_mutex);
- PHP3_MUTEX_FREE(ldap_mutex);
-#endif
return SUCCESS;
}
@@ -318,7 +178,7 @@
php3_printf("<table>"
"<tr><td>Total links:</td><td>%d/%s</td></tr>\n"
- "<tr><td>RCS Version:</td><td>$Id: ldap.c,v 1.75 1999/11/28
13:52:20 venaas Exp $</td></tr>\n"
+ "<tr><td>RCS Version:</td><td>$Id: ldap.c,v 1.76 1999/12/26
18:44:46 rasmus Exp $</td></tr>\n"
#if HAVE_NSLDAP
"<tr><td>SDK Version:</td><td>%f</td></tr>"
"<tr><td>Highest LDAP Protocol
Supported:</td><td>%f</td></tr>"
Index: php3/functions/link.c
diff -u php3/functions/link.c:1.38 php3/functions/link.c:1.39
--- php3/functions/link.c:1.38 Sun Nov 28 11:34:32 1999
+++ php3/functions/link.c Sun Dec 26 13:44:46 1999
@@ -28,10 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: link.c,v 1.38 1999/11/28 16:34:32 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: link.c,v 1.39 1999/12/26 18:44:46 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "php3_filestat.h"
Index: php3/functions/magick.c
diff -u php3/functions/magick.c:1.9 php3/functions/magick.c:1.10
--- php3/functions/magick.c:1.9 Mon Nov 22 17:14:56 1999
+++ php3/functions/magick.c Sun Dec 26 13:44:46 1999
@@ -28,7 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: magick.c,v 1.9 1999/11/22 22:14:56 eschmid Exp $ */
+/* $Id: magick.c,v 1.10 1999/12/26 18:44:46 rasmus Exp $ */
/* TODO list:
*
@@ -40,9 +40,6 @@
/* {{{ includes & stuff */
#if defined(COMPILE_DL)
-# ifdef THREAD_SAFE
-# undef THREAD_SAFE /* XXX no need in 3.0 */
-# endif
# include "dl/phpdl.h"
#endif
@@ -84,55 +81,15 @@
} magick_module;
/* }}} */
-/* {{{ thread safety stuff */
-#ifdef THREAD_SAFE
-# define MAGICK_GLOBAL(a) magick_globals->a
-# define MAGICK_TLS_VARS magick_global_struct *magick_globals = TlsGetValue(MAGICKTls);
-void *magick_mutex;
-DWORD MAGICKTls;
-static int numthreads=0;
-
-typedef struct magick_global_struct {
- magick_module php3_magick_module;
-} magick_global_struct;
-#else /* !defined(THREAD_SAFE) */
-# define MAGICK_GLOBAL(a) a
-# define MAGICK_TLS_VARS
+#define MAGICK_GLOBAL(a) a
+#define MAGICK_TLS_VARS
magick_module php3_magick_module;
-#endif /* defined(THREAD_SAFE) */
-/* }}} */
/* {{{ dynamically loadable module stuff */
#if COMPILE_DL
DLEXPORT php3_module_entry *get_module() { return &magick_module_entry; };
-
-# if (WIN32|WINNT) && defined(THREAD_SAFE)
-/* NOTE: You should have an magick.def file where you export DllMain */
-BOOL WINAPI DllMain(HANDLE hModule, DWORD ul_reason_for_call,
- LPVOID lpReserved)
-{
- switch (ul_reason_for_call) {
- case DLL_PROCESS_ATTACH:
- if ((MAGICKTls = TlsAlloc()) == 0xFFFFFFFF){
- return 0;
- }
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
- break;
- case DLL_PROCESS_DETACH:
- if (!TlsFree(MAGICKTls)) {
- return 0;
- }
- break;
- }
- return 1;
-}
-
-# endif /* thread safe on Windows */
#endif /* COMPILE_DL */
/* }}} */
@@ -190,34 +147,6 @@
int php3_minit_magick(INIT_FUNC_ARGS)
{
-#ifdef THREAD_SAFE
- magick_global_struct *magick_globals;
-# if !COMPILE_DL
-# if WIN32|WINNT
- CREATE_MUTEX(magick_mutex,"MAGICK_TLS");
-# endif
- SET_MUTEX(magick_mutex);
- numthreads++;
- if (numthreads == 1) {
- if ((MAGICKTls = TlsAlloc()) == 0xFFFFFFFF){
- FREE_MUTEX(magick_mutex);
- return 0;
- }
- }
- FREE_MUTEX(magick_mutex);
-# endif /* !COMPILE_DL */
- magick_globals =
- (magick_global_struct *) LocalAlloc(LPTR, sizeof(magick_global_struct));
- TlsSetValue(MAGICKTls, (void *) magick_globals);
-#endif /* THREAD_SAFE */
-
-#if NEEDED
- if (cfg_get_long("oci8.allow_persistent",
- &OCI8_GLOBAL(php3_oci8_module).allow_persistent)
- == FAILURE) {
- OCI8_GLOBAL(php3_oci8_module).allow_persistent = -1;
- }
-#endif
MAGICK_GLOBAL(php3_magick_module).debug_mode = 0;
MAGICK_GLOBAL(php3_magick_module).le_imageinfo =
@@ -248,24 +177,6 @@
int php3_mshutdown_magick()
{
-#ifdef THREAD_SAFE
- magick_global_struct *magick_globals;
- magick_globals = TlsGetValue(MAGICKTls);
- if (magick_globals != 0) {
- LocalFree((HLOCAL) magick_globals);
- }
-#if !COMPILE_DL
- SET_MUTEX(magick_mutex);
- numthreads--;
- if (!numthreads) {
- if (!TlsFree(MAGICKTls)) {
- FREE_MUTEX(magick_mutex);
- return 0;
- }
- }
- FREE_MUTEX(magick_mutex);
-#endif
-#endif
return SUCCESS;
}
@@ -280,7 +191,7 @@
PUTS(MagickVersion);
PUTS("<BR>\n");
PUTS(MagickCopyright);
- PUTS("<br>RCS Version: $Id: magick.c,v 1.9 1999/11/22 22:14:56 eschmid Exp
$<br>\n");
+ PUTS("<br>RCS Version: $Id: magick.c,v 1.10 1999/12/26 18:44:46 rasmus Exp
$<br>\n");
php3_printf("<b>Compile
Options</b><br><tt>IMAGICK_INCLUDE=%s<br>\n"
"IMAGICK_LFLAGS=%s<br>\n"
"IMAGICK_LIBS=%s<br></tt>\n",
Index: php3/functions/mail.c
diff -u php3/functions/mail.c:1.59 php3/functions/mail.c:1.60
--- php3/functions/mail.c:1.59 Fri Jan 1 12:59:12 1999
+++ php3/functions/mail.c Sun Dec 26 13:44:47 1999
@@ -28,14 +28,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mail.c,v 1.59 1999/01/01 17:59:12 zeev Exp $ */
+/* $Id: mail.c,v 1.60 1999/12/26 18:44:47 rasmus Exp $ */
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h"
#ifndef MSVC5
#include "build-defs.h"
Index: php3/functions/math.c
diff -u php3/functions/math.c:1.47 php3/functions/math.c:1.48
--- php3/functions/math.c:1.47 Sat Jul 31 13:17:35 1999
+++ php3/functions/math.c Sun Dec 26 13:44:47 1999
@@ -28,11 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: math.c,v 1.47 1999/07/31 17:17:35 zeev Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: math.c,v 1.48 1999/12/26 18:44:47 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
#include "phpmath.h"
Index: php3/functions/md5.c
diff -u php3/functions/md5.c:1.36 php3/functions/md5.c:1.37
--- php3/functions/md5.c:1.36 Mon Feb 1 02:44:07 1999
+++ php3/functions/md5.c Sun Dec 26 13:44:47 1999
@@ -27,15 +27,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id: md5.c,v 1.36 1999/02/01 07:44:07 fmk Exp $ */
+/* $Id: md5.c,v 1.37 1999/12/26 18:44:47 rasmus Exp $ */
/*
* md5.c - Copyright 1997 Lachlan Roche
*/
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
#include <stdio.h>
#include "php.h"
#include "internal_functions.h"
Index: php3/functions/microtime.c
diff -u php3/functions/microtime.c:1.33 php3/functions/microtime.c:1.34
--- php3/functions/microtime.c:1.33 Tue Sep 21 04:42:01 1999
+++ php3/functions/microtime.c Sun Dec 26 13:44:47 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: microtime.c,v 1.33 1999/09/21 08:42:01 sas Exp $ */
+/* $Id: microtime.c,v 1.34 1999/12/26 18:44:47 rasmus Exp $ */
#include "php.h"
#include <stdlib.h>
@@ -43,9 +43,7 @@
#include <string.h>
#include <errno.h>
-#ifdef THREAD_SAFE
#include "tls.h"
-#endif
#include "internal_functions.h"
#include "microtime.h"
#include "snprintf.h"
Index: php3/functions/mime.c
diff -u php3/functions/mime.c:1.59 php3/functions/mime.c:1.60
--- php3/functions/mime.c:1.59 Sun Nov 21 12:28:00 1999
+++ php3/functions/mime.c Sun Dec 26 13:44:47 1999
@@ -23,13 +23,10 @@
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
- | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+ | Authors: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mime.c,v 1.59 1999/11/21 17:28:00 sas Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: mime.c,v 1.60 1999/12/26 18:44:47 rasmus Exp $ */
#include <stdio.h>
#include "php.h"
#include "internal_functions.h"
@@ -38,10 +35,8 @@
#include "mime.h"
#include "php3_list.h"
-#ifndef THREAD_SAFE
int le_uploads;
extern HashTable list;
-#endif
#define NEW_BOUNDARY_CHECK 1
#define SAFE_RETURN { if (namebuf) efree(namebuf); if (filenamebuf) efree(filenamebuf); if (lbuf)
efree(lbuf); if (abuf) efree(abuf); return; }
Index: php3/functions/msql.c
diff -u php3/functions/msql.c:1.104 php3/functions/msql.c:1.105
--- php3/functions/msql.c:1.104 Sat Feb 27 09:35:03 1999
+++ php3/functions/msql.c Sun Dec 26 13:44:47 1999
@@ -27,11 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: msql.c,v 1.104 1999/02/27 14:35:03 sas Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
+/* $Id: msql.c,v 1.105 1999/12/26 18:44:47 rasmus Exp $ */
#if !(WIN32|WINNT)
#include "config.h"
#endif
@@ -57,26 +53,9 @@
#endif
#include "php3_list.h"
-#ifdef THREAD_SAFE
-DWORD MSQLTls;
-static int numthreads=0;
-void *msql_mutex;
-
-typedef struct msql_global_struct{
- msql_module php3_msql_module;
-}msql_global_struct;
-
-#define MSQL_GLOBAL(a) msql_globals->a
-
-#define MSQL_TLS_VARS \
- msql_global_struct *msql_globals; \
- msql_globals=TlsGetValue(MSQLTls);
-
-#else
#define MSQL_GLOBAL(a) a
#define MSQL_TLS_VARS
msql_module php3_msql_module;
-#endif
function_entry msql_functions[] = {
{"msql_connect", php3_msql_connect, NULL},
@@ -138,33 +117,6 @@
#if COMPILE_DL
DLEXPORT php3_module_entry *get_module(void) { return &msql_module_entry; }
-#if (WIN32|WINNT) && defined(THREAD_SAFE)
-
-/*NOTE: You should have an odbc.def file where you
-export DllMain*/
-BOOL WINAPI DllMain(HANDLE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved)
-{
- switch( ul_reason_for_call ) {
- case DLL_PROCESS_ATTACH:
- if ((MSQLTls=TlsAlloc())==0xFFFFFFFF){
- return 0;
- }
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
- break;
- case DLL_PROCESS_DETACH:
- if (!TlsFree(MSQLTls)){
- return 0;
- }
- break;
- }
- return 1;
-}
-#endif
#endif
typedef struct {
@@ -222,23 +174,6 @@
DLEXPORT int php3_minit_msql(INIT_FUNC_ARGS)
{
-#ifdef THREAD_SAFE
- msql_global_struct *msql_globals;
-#if !COMPILE_DL
- CREATE_MUTEX(msql_mutex,"MSQL_TLS");
- SET_MUTEX(msql_mutex);
- numthreads++;
- if (numthreads==1){
- if ((MSQLTls=TlsAlloc())==0xFFFFFFFF){
- FREE_MUTEX(msql_mutex);
- return 0;
- }}
- FREE_MUTEX(msql_mutex);
-#endif
- msql_globals = (msql_global_struct *) LocalAlloc(LPTR, sizeof(msql_global_struct));
- TlsSetValue(MSQLTls, (void *) msql_globals);
-#endif
-
if
(cfg_get_long("msql.allow_persistent",&MSQL_GLOBAL(php3_msql_module).allow_persistent)==FAILURE)
{
MSQL_GLOBAL(php3_msql_module).allow_persistent=1;
}
@@ -259,22 +194,6 @@
}
DLEXPORT int php3_mshutdown_msql(void){
-#ifdef THREAD_SAFE
- msql_global_struct *msql_globals;
- msql_globals = TlsGetValue(MSQLTls);
- if (msql_globals != 0)
- LocalFree((HLOCAL) msql_globals);
-#if !COMPILE_DL
- SET_MUTEX(msql_mutex);
- numthreads--;
- if (!numthreads){
- if (!TlsFree(MSQLTls)){
- FREE_MUTEX(msql_mutex);
- return 0;
- }}
- FREE_MUTEX(msql_mutex);
-#endif
-#endif
return SUCCESS;
}
Index: php3/functions/mysql.c
diff -u php3/functions/mysql.c:1.190 php3/functions/mysql.c:1.191
--- php3/functions/mysql.c:1.190 Fri Nov 5 16:28:38 1999
+++ php3/functions/mysql.c Sun Dec 26 13:44:47 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysql.c,v 1.190 1999/11/05 21:28:38 rasmus Exp $ */
+/* $Id: mysql.c,v 1.191 1999/12/26 18:44:47 rasmus Exp $ */
/* TODO:
@@ -36,23 +36,9 @@
*/
#define IS_EXT_MODULE
-#ifdef THREAD_SAFE
-# ifndef PHP_31
-# undef THREAD_SAFE /*no need in 3.0*/
-# else
-# include "tls.h"
- DWORD MySQLTls;
- static int numthreads=0;
- void *mysql_mutex;
-# endif
-#endif
#if COMPILE_DL
-# if PHP_31
-# include "../phpdl.h"
-# else
-# include "dl/phpdl.h"
-# endif
+# include "dl/phpdl.h"
#endif
#if WIN32|WINNT
@@ -70,11 +56,7 @@
#include "php.h"
#include "internal_functions.h"
-#if PHP_31
-# include "ext/standard/php3_string.h"
-#else
-# include "php3_string.h"
-#endif
+#include "php3_string.h"
#include "php3_mysql.h"
#if HAVE_MYSQL
@@ -182,19 +164,9 @@
extern void timeout(int sig);
#endif
-#if defined(THREAD_SAFE)
-typedef struct mysql_global_struct{
- mysql_module php3_mysql_module;
-}mysql_global_struct;
-
-#define MySQL_GLOBAL(a) mysql_globals->a
-#define MySQL_TLS_VARS mysql_global_struct *mysql_globals=TlsGetValue(MySQLTls);
-
-#else
#define MySQL_GLOBAL(a) a
#define MySQL_TLS_VARS
mysql_module php3_mysql_module;
-#endif
#define CHECK_LINK(link) { if (link==-1) { php3_error(E_WARNING,"MySQL: A link to the server
could not be established"); RETURN_FALSE; } }
@@ -251,25 +223,6 @@
int php3_minit_mysql(INIT_FUNC_ARGS)
{
-#if defined(THREAD_SAFE)
- mysql_global_struct *mysql_globals;
- PHP3_MUTEX_ALLOC(mysql_mutex);
- PHP3_MUTEX_LOCK(mysql_mutex);
- numthreads++;
- if (numthreads==1){
- if (!PHP3_TLS_PROC_STARTUP(MySQLTls)){
- PHP3_MUTEX_UNLOCK(mysql_mutex);
- PHP3_MUTEX_FREE(mysql_mutex);
- return FAILURE;
- }
- }
- PHP3_MUTEX_UNLOCK(mysql_mutex);
- if(!PHP3_TLS_THREAD_INIT(MySQLTls,mysql_globals,mysql_global_struct)){
- PHP3_MUTEX_FREE(mysql_mutex);
- return FAILURE;
- }
-#endif
-
if
(cfg_get_long("mysql.allow_persistent",&MySQL_GLOBAL(php3_mysql_module).allow_persistent)==FAILURE)
{
MySQL_GLOBAL(php3_mysql_module).allow_persistent=1;
}
@@ -328,18 +281,6 @@
int php3_mshutdown_mysql(void){
MySQL_TLS_VARS;
-#ifdef THREAD_SAFE
- PHP3_TLS_THREAD_FREE(mysql_globals);
- PHP3_MUTEX_LOCK(mysql_mutex);
- numthreads--;
- if (numthreads<1) {
- PHP3_TLS_PROC_SHUTDOWN(MySQLTls);
- PHP3_MUTEX_UNLOCK(mysql_mutex);
- PHP3_MUTEX_FREE(mysql_mutex);
- return SUCCESS;
- }
- PHP3_MUTEX_UNLOCK(mysql_mutex);
-#endif
return SUCCESS;
}
@@ -404,8 +345,6 @@
MYSQL *mysql;
MySQL_TLS_VARS;
- /*FIXME need to deal with php3_ini, not available in external modules*/
-#ifndef PHP_31
if (php3_ini.sql_safe_mode) {
if (ARG_COUNT(ht)>0) {
php3_error(E_NOTICE,"SQL safe mode in effect - ignoring host/user/password
information");
@@ -415,9 +354,7 @@
hashed_details_length = strlen(user)+5+3;
hashed_details = (char *) emalloc(hashed_details_length+1);
sprintf(hashed_details,"mysql__%s_",user);
- } else
-#endif
- {
+ } else {
host = MySQL_GLOBAL(php3_mysql_module).default_host;
user = MySQL_GLOBAL(php3_mysql_module).default_user;
passwd = MySQL_GLOBAL(php3_mysql_module).default_password;
@@ -580,11 +517,7 @@
int type,link;
void *ptr;
-#ifdef THREAD_SAFE
- if (index_ptr->type != _php3_le_index_ptr()) {
-#else
if (index_ptr->type != le_index_ptr) {
-#endif
RETURN_FALSE;
}
link = (int) index_ptr->ptr;
@@ -623,11 +556,7 @@
/* add it to the hash */
new_index_ptr.ptr = (void *) return_value->value.lval;
-#ifdef THREAD_SAFE
- new_index_ptr.type = _php3_le_index_ptr();
-#else
new_index_ptr.type = le_index_ptr;
-#endif
if (_php3_hash_update(list,hashed_details,hashed_details_length+1,(void *) &new_index_ptr,
sizeof(list_entry), NULL)==FAILURE) {
efree(hashed_details);
RETURN_FALSE;
@@ -809,7 +738,6 @@
} else {
RETURN_TRUE;
}
-
}
/* }}} */
#endif
@@ -1432,11 +1360,9 @@
}
if (sql_row[field_offset]) {
-#ifndef PHP_31 /* FIXME: cannot access php3_ini in modules */
if (php3_ini.magic_quotes_runtime) {
return_value->value.str.val =
_php3_addslashes(sql_row[field_offset],sql_row_lengths[field_offset],&return_value->value.str.len,0);
} else
-#endif
{
return_value->value.str.len = sql_row_lengths[field_offset];
return_value->value.str.val = (char *)
safe_estrndup(sql_row[field_offset],return_value->value.str.len);
Index: php3/functions/number.c
diff -u php3/functions/number.c:1.21 php3/functions/number.c:1.22
--- php3/functions/number.c:1.21 Fri Jul 2 16:34:43 1999
+++ php3/functions/number.c Sun Dec 26 13:44:47 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: number.c,v 1.21 1999/07/02 20:34:43 markonen Exp $
+/* $Id: number.c,v 1.22 1999/12/26 18:44:47 rasmus Exp $
Implements arbitrary precision numbers. */
/* This file is part of GNU bc.
@@ -56,15 +56,6 @@
*************************************************************************/
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-#if 0
-#include "bcdefs.h"
-#include "proto.h"
-#include "php3_global.h"
-#endif
-
#include "number.h"
#include "php.h"
#include <stdio.h>
@@ -72,11 +63,9 @@
#include <string.h>
/* Storage used for special numbers. */
-#ifndef THREAD_SAFE
bc_num _zero_;
bc_num _one_;
bc_num _two_;
-#endif
#define rt_warn(msg) php3_error(E_WARNING,msg)
#define rt_error(msg) php3_error(E_WARNING,msg)
Index: php3/functions/oci8.c
diff -u php3/functions/oci8.c:1.129 php3/functions/oci8.c:1.130
--- php3/functions/oci8.c:1.129 Wed Dec 8 09:09:23 1999
+++ php3/functions/oci8.c Sun Dec 26 13:44:47 1999
@@ -33,7 +33,7 @@
#define OCI8_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */
-/* $Id: oci8.c,v 1.129 1999/12/08 14:09:23 thies Exp $ */
+/* $Id: oci8.c,v 1.130 1999/12/26 18:44:47 rasmus Exp $ */
/* TODO list:
*
@@ -59,9 +59,6 @@
/* {{{ includes & stuff */
#if defined(COMPILE_DL)
-# ifdef THREAD_SAFE
-# undef THREAD_SAFE /* XXX no need in 3.0 */
-# endif
# include "dl/phpdl.h"
#endif
@@ -113,53 +110,15 @@
/* }}} */
/* {{{ thread safety stuff */
-#ifdef THREAD_SAFE
-# define OCI8_GLOBAL(a) oci8_globals->a
-# define OCI8_TLS_VARS oci8_global_struct *oci8_globals = TlsGetValue(OCI8Tls);
-void *oci8_mutex;
-DWORD OCI8Tls;
-static int numthreads=0;
-
-typedef struct oci8_global_struct {
- oci8_module php3_oci8_module;
-} oci8_global_struct;
-#else /* !defined(THREAD_SAFE) */
-# define OCI8_GLOBAL(a) a
-# define OCI8_TLS_VARS
+#define OCI8_GLOBAL(a) a
+#define OCI8_TLS_VARS
oci8_module php3_oci8_module;
-#endif /* defined(THREAD_SAFE) */
/* }}} */
/* {{{ dynamically loadable module stuff */
#if COMPILE_DL
DLEXPORT php3_module_entry *get_module() { return &oci8_module_entry; };
-
-# if (WIN32|WINNT) && defined(THREAD_SAFE)
-/* NOTE: You should have an oci8.def file where you export DllMain */
-BOOL WINAPI DllMain(HANDLE hModule, DWORD ul_reason_for_call,
- LPVOID lpReserved)
-{
- switch (ul_reason_for_call) {
- case DLL_PROCESS_ATTACH:
- if ((OCI8Tls = TlsAlloc()) == 0xFFFFFFFF){
- return 0;
- }
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
- break;
- case DLL_PROCESS_DETACH:
- if (!TlsFree(OCI8Tls)) {
- return 0;
- }
- break;
- }
- return 1;
-}
-
-# endif /* thread safe on Windows */
#endif /* COMPILE_DL */
/* }}} */
@@ -346,27 +305,6 @@
int php3_minit_oci8(INIT_FUNC_ARGS)
{
-#ifdef THREAD_SAFE
- oci8_global_struct *oci8_globals;
-# if !COMPILE_DL
-# if WIN32|WINNT
- CREATE_MUTEX(oci8_mutex,"OCI8_TLS");
-# endif
- SET_MUTEX(oci8_mutex);
- numthreads++;
- if (numthreads == 1) {
- if ((OCI8Tls = TlsAlloc()) == 0xFFFFFFFF){
- FREE_MUTEX(oci8_mutex);
- return 0;
- }
- }
- FREE_MUTEX(oci8_mutex);
-# endif /* !COMPILE_DL */
- oci8_globals =
- (oci8_global_struct *) LocalAlloc(LPTR, sizeof(oci8_global_struct));
- TlsSetValue(OCI8Tls, (void *) oci8_globals);
-#endif /* THREAD_SAFE */
-
/* XXX NYI
if (cfg_get_long("oci8.allow_persistent",
&OCI8_GLOBAL(php3_oci8_module).allow_persistent)
@@ -509,25 +447,6 @@
free(OCI8_GLOBAL(php3_oci8_module).conns);
OCIHandleFree((dvoid *)OCI8_GLOBAL(php3_oci8_module).pEnv, OCI_HTYPE_ENV);
-
-#ifdef THREAD_SAFE
- oci8_global_struct *oci8_globals;
- oci8_globals = TlsGetValue(OCI8Tls);
- if (oci8_globals != 0) {
- LocalFree((HLOCAL) oci8_globals);
- }
-#if !COMPILE_DL
- SET_MUTEX(oci8_mutex);
- numthreads--;
- if (!numthreads) {
- if (!TlsFree(OCI8Tls)) {
- FREE_MUTEX(oci8_mutex);
- return 0;
- }
- }
- FREE_MUTEX(oci8_mutex);
-#endif
-#endif
return SUCCESS;
}
Index: php3/functions/oracle.c
diff -u php3/functions/oracle.c:1.115 php3/functions/oracle.c:1.116
--- php3/functions/oracle.c:1.115 Fri Dec 24 08:46:39 1999
+++ php3/functions/oracle.c Sun Dec 26 13:44:47 1999
@@ -37,14 +37,7 @@
#define HAS_OLOG 1
#if defined(COMPILE_DL)
-# if PHP_31
-# include "../phpdl.h"
-# else
-# ifdef THREAD_SAFE
-# undef THREAD_SAFE
-# endif
-# include "dl/phpdl.h"
-# endif
+# include "dl/phpdl.h"
#endif
#include "php.h"
@@ -83,26 +76,9 @@
#define min(a, b) ((a) > (b) ? (b) : (a))
#endif
-#ifdef THREAD_SAFE
-
-void *oracle_mutex;
-DWORD ORACLETls;
-static int numthreads=0;
-
-typedef struct oracle_global_struct {
- oracle_module php3_oracle_module;
-} oracle_global_struct;
-
-#define ORACLE_GLOBAL(a) oracle_globals->a
-
-#define ORACLE_TLS_VARS \
- oracle_global_struct *oracle_globals = TlsGetValue(ORACLETls);
-
-#else
oracle_module php3_oracle_module;
#define ORACLE_GLOBAL(a) a
#define ORACLE_TLS_VARS
-#endif
#undef ORACLE_DEBUG
@@ -282,25 +258,6 @@
int php3_minit_oracle(INIT_FUNC_ARGS)
{
-#if defined(THREAD_SAFE)
- oracle_global_struct *oracle_globals;
- PHP3_MUTEX_ALLOC(oracle_mutex);
- PHP3_MUTEX_LOCK(oracle_mutex);
- numthreads++;
- if (numthreads==1){
- if (!PHP3_TLS_PROC_STARTUP(ORACLETls)){
- PHP3_MUTEX_UNLOCK(oracle_mutex);
- PHP3_MUTEX_FREE(oracle_mutex);
- return FAILURE;
- }
- }
- PHP3_MUTEX_UNLOCK(oracle_mutex);
- if(!PHP3_TLS_THREAD_INIT(ORACLETls,oracle_globals,oracle_global_struct)){
- PHP3_MUTEX_FREE(oracle_mutex);
- return FAILURE;
- }
-#endif
-
if (cfg_get_long("oracle.allow_persistent",
&ORACLE_GLOBAL(php3_oracle_module).allow_persistent)
== FAILURE) {
@@ -363,19 +320,6 @@
{
ORACLE_TLS_VARS;
-#ifdef THREAD_SAFE
- PHP3_TLS_THREAD_FREE(oracle_globals);
- PHP3_MUTEX_LOCK(oracle_mutex);
- numthreads--;
- if (numthreads<1) {
- PHP3_TLS_PROC_SHUTDOWN(ORACLETls);
- PHP3_MUTEX_UNLOCK(oracle_mutex);
- PHP3_MUTEX_FREE(oracle_mutex);
- return SUCCESS;
- }
- PHP3_MUTEX_UNLOCK(oracle_mutex);
-#endif
-
_php3_hash_destroy(ORACLE_GLOBAL(php3_oracle_module).conns);
free(ORACLE_GLOBAL(php3_oracle_module).conns);
@@ -526,11 +470,7 @@
new_le.ptr = db_conn;*/
RETVAL_RESOURCE(php3_plist_insert(db_conn, ORACLE_GLOBAL(php3_oracle_module).le_pconn));
new_index_ptr.ptr = (void *) return_value->value.lval;
-#ifdef THREAD_SAFE
- new_index_ptr.type = _php3_le_index_ptr();
-#else
new_index_ptr.type = le_index_ptr;
-#endif
if (_php3_hash_update(plist,hashed_details,hashed_len + 1,(void *) &new_index_ptr,
sizeof(list_entry),NULL) == FAILURE) {
ologof(&db_conn->lda);
@@ -551,11 +491,7 @@
int type;
/* the link is already in the persistent list */
-#ifdef THREAD_SAFE
- if (index_ptr->type != _php3_le_index_ptr()) {
-#else
if (index_ptr->type != le_index_ptr) {
-#endif
efree(hashed_details);
php3_error(E_WARNING, "Oops, something went completly wrong");
RETURN_FALSE;
Index: php3/functions/pack.c
diff -u php3/functions/pack.c:1.23 php3/functions/pack.c:1.24
--- php3/functions/pack.c:1.23 Fri Jan 22 15:55:49 1999
+++ php3/functions/pack.c Sun Dec 26 13:44:47 1999
@@ -26,10 +26,7 @@
| Authors: Chris Schneider <cschneid@relog.ch> |
+----------------------------------------------------------------------+
*/
-/* $Id: pack.c,v 1.23 1999/01/22 20:55:49 rasmus Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: pack.c,v 1.24 1999/12/26 18:44:47 rasmus Exp $ */
#include "php.h"
#include <stdio.h>
Index: php3/functions/pageinfo.c
diff -u php3/functions/pageinfo.c:1.42 php3/functions/pageinfo.c:1.43
--- php3/functions/pageinfo.c:1.42 Sat Jun 26 12:46:32 1999
+++ php3/functions/pageinfo.c Sun Dec 26 13:44:47 1999
@@ -26,10 +26,7 @@
| Authors: Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: pageinfo.c,v 1.42 1999/06/26 16:46:32 fmk Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: pageinfo.c,v 1.43 1999/12/26 18:44:47 rasmus Exp $ */
#include "php.h"
#include "pageinfo.h"
@@ -50,11 +47,9 @@
#include <process.h>
#endif
-#ifndef THREAD_SAFE
static long page_uid = -1;
static long page_inode = -1;
static long page_mtime = -1;
-#endif
static void _php3_statpage(void)
{
Index: php3/functions/pdf.c
diff -u php3/functions/pdf.c:1.55 php3/functions/pdf.c:1.56
--- php3/functions/pdf.c:1.55 Mon Nov 22 18:01:31 1999
+++ php3/functions/pdf.c Sun Dec 26 13:44:47 1999
@@ -27,17 +27,13 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdf.c,v 1.55 1999/11/22 23:01:31 eschmid Exp $ */
+/* $Id: pdf.c,v 1.56 1999/12/26 18:44:47 rasmus Exp $ */
/* pdflib 0.6 is subject to the ALADDIN FREE PUBLIC LICENSE.
Copyright (C) 1997 Thomas Merz. */
/* Note that there is no code from the pdflib package in this file */
-#if !PHP_31 && defined(THREAD_SAFE)
-#undef THREAD_SAFE
-#endif
-
#include "php.h"
#include "internal_functions.h"
#include "php3_list.h"
@@ -58,24 +54,6 @@
#if HAVE_PDFLIB
-#ifdef THREAD_SAFE
-DWORD PDFlibTls;
-static int numthreads=0;
-
-typedef struct pdflib_global_struct{
- int le_pdf_image;
-#if HAVE_PDFLIB2
- int le_outline;
-#else
- int le_pdf_info;
-#endif
- int le_pdf;
-} pdflib_global_struct;
-
-# define PDF_GLOBAL(a) pdflib_globals->a
-# define PDF_TLS_VARS pdflib_global_struct *pdflib_globals=TlsGetValue(PDFlibTls)
-
-#else
# define PDF_GLOBAL(a) a
# define PDF_TLS_VARS
static int le_pdf_image;
@@ -85,7 +63,6 @@
static int le_pdf_info;
#endif
static int le_pdf;
-#endif
function_entry pdf_functions[] = {
#if HAVE_PDFLIB2
Index: php3/functions/php3_ifx.h
diff -u php3/functions/php3_ifx.h:1.20 php3/functions/php3_ifx.h:1.21
--- php3/functions/php3_ifx.h:1.20 Sat May 8 17:46:52 1999
+++ php3/functions/php3_ifx.h Sun Dec 26 13:44:47 1999
@@ -30,7 +30,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php3_ifx.h,v 1.20 1999/05/08 21:46:52 jah Exp $ */
+/* $Id: php3_ifx.h,v 1.21 1999/12/26 18:44:47 rasmus Exp $ */
#ifndef _PHP3_IFX_H
#define _PHP3_IFX_H
@@ -179,9 +179,7 @@
-#ifndef THREAD_SAFE
extern ifx_module php3_ifx_module;
-#endif
#else
Index: php3/functions/php3_ldap.h
diff -u php3/functions/php3_ldap.h:1.28 php3/functions/php3_ldap.h:1.29
--- php3/functions/php3_ldap.h:1.28 Fri Sep 10 05:02:57 1999
+++ php3/functions/php3_ldap.h Sun Dec 26 13:44:47 1999
@@ -29,7 +29,7 @@
*/
-/* $Id: php3_ldap.h,v 1.28 1999/09/10 09:02:57 kk Exp $ */
+/* $Id: php3_ldap.h,v 1.29 1999/12/26 18:44:47 rasmus Exp $ */
#ifndef _PHP3_LDAP_H
#define _PHP3_LDAP_H
@@ -98,26 +98,9 @@
char *base_dn;
int le_result, le_result_entry, le_ber_entry;
int le_link;
-
- /* I just found out that the thread safe features
- of the netscape ldap library are only required if
- multiple threads are accessing the same LDAP
- structure. Since we are not doing that, we do
- not need to use this feature. I am leaving the
- code here anyway just in case. smc
- */
-#if 0
- struct ldap_thread_fns tfns;
- int le_errno; /* Corresponds to the LDAP error code */
- char *le_matched; /* Matching components of the DN,
- if an NO_SUCH_OBJECT error occurred */
- char *le_errmsg; /* Error message */
-#endif
} ldap_module;
-#ifndef THREAD_SAFE
extern ldap_module php3_ldap_module;
-#endif
#else
Index: php3/functions/php3_mcal.h
diff -u php3/functions/php3_mcal.h:1.13 php3/functions/php3_mcal.h:1.14
--- php3/functions/php3_mcal.h:1.13 Thu Sep 23 11:46:19 1999
+++ php3/functions/php3_mcal.h Sun Dec 26 13:44:47 1999
@@ -1,4 +1,4 @@
-/* $Id: php3_mcal.h,v 1.13 1999/09/23 15:46:19 askalski Exp $ */
+/* $Id: php3_mcal.h,v 1.14 1999/12/26 18:44:47 rasmus Exp $ */
#ifndef _INCLUDED_MCAL_H
#define _INCLUDED_MCAL_H
@@ -10,9 +10,6 @@
#if HAVE_MCAL
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#ifndef MSVC5
#include "build-defs.h"
#endif
Index: php3/functions/php3_mckcrypt.c
diff -u php3/functions/php3_mckcrypt.c:1.3 php3/functions/php3_mckcrypt.c:1.4
--- php3/functions/php3_mckcrypt.c:1.3 Fri Feb 19 22:01:33 1999
+++ php3/functions/php3_mckcrypt.c Sun Dec 26 13:44:47 1999
@@ -31,10 +31,6 @@
/*
* php3_mckcrypt.c - Copyright 1998 Timothy Whitfield
*/
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
#include <stdio.h>
#include "php.h"
#include "internal_functions.h"
Index: php3/functions/php3_msql.h
diff -u php3/functions/php3_msql.h:1.25 php3/functions/php3_msql.h:1.26
--- php3/functions/php3_msql.h:1.25 Fri Jan 1 12:59:16 1999
+++ php3/functions/php3_msql.h Sun Dec 26 13:44:47 1999
@@ -28,7 +28,7 @@
*/
-/* $Id: php3_msql.h,v 1.25 1999/01/01 17:59:16 zeev Exp $ */
+/* $Id: php3_msql.h,v 1.26 1999/12/26 18:44:47 rasmus Exp $ */
#ifndef _PHP3_MSQL_H
#define _PHP3_MSQL_H
@@ -88,9 +88,7 @@
int le_plink;
} msql_module;
-#ifndef THREAD_SAFE
extern msql_module php3_msql_module;
-#endif
#else
#define msql_module_ptr NULL
Index: php3/functions/php3_mysql.h
diff -u php3/functions/php3_mysql.h:1.25 php3/functions/php3_mysql.h:1.26
--- php3/functions/php3_mysql.h:1.25 Fri Nov 5 16:28:38 1999
+++ php3/functions/php3_mysql.h Sun Dec 26 13:44:47 1999
@@ -28,7 +28,7 @@
*/
-/* $Id: php3_mysql.h,v 1.25 1999/11/05 21:28:38 rasmus Exp $ */
+/* $Id: php3_mysql.h,v 1.26 1999/12/26 18:44:47 rasmus Exp $ */
#ifndef _PHP3_MYSQL_H
#define _PHP3_MYSQL_H
@@ -93,9 +93,7 @@
char *default_host, *default_user, *default_password;
} mysql_module;
-#ifndef THREAD_SAFE
extern mysql_module php3_mysql_module;
-#endif
#else
Index: php3/functions/php3_posix.h
diff -u php3/functions/php3_posix.h:1.4 php3/functions/php3_posix.h:1.5
--- php3/functions/php3_posix.h:1.4 Sun Sep 12 13:19:56 1999
+++ php3/functions/php3_posix.h Sun Dec 26 13:44:47 1999
@@ -28,7 +28,7 @@
*/
-/* $Id: php3_posix.h,v 1.4 1999/09/12 17:19:56 kk Exp $ */
+/* $Id: php3_posix.h,v 1.5 1999/12/26 18:44:47 rasmus Exp $ */
#ifndef _PHP3_POSIX_H
#define _PHP3_POSIX_H
@@ -90,9 +90,7 @@
int dummy;
} posix_module;
-#ifndef THREAD_SAFE
extern posix_module php3_posix_module;
-#endif
#else
Index: php3/functions/php3_recode.h
diff -u php3/functions/php3_recode.h:1.2 php3/functions/php3_recode.h:1.3
--- php3/functions/php3_recode.h:1.2 Sun Nov 21 18:57:30 1999
+++ php3/functions/php3_recode.h Sun Dec 26 13:44:47 1999
@@ -28,7 +28,7 @@
*/
-/* $Id: php3_recode.h,v 1.2 1999/11/21 23:57:30 kk Exp $ */
+/* $Id: php3_recode.h,v 1.3 1999/12/26 18:44:47 rasmus Exp $ */
#ifndef _PHP3_RECODE_H
#define _PHP3_RECODE_H
@@ -65,9 +65,7 @@
RECODE_OUTER outer;
} recode_module;
-#ifndef THREAD_SAFE
extern recode_module php3_recode_module;
-#endif
#else
Index: php3/functions/php3_string.h
diff -u php3/functions/php3_string.h:1.45 php3/functions/php3_string.h:1.46
--- php3/functions/php3_string.h:1.45 Thu Oct 7 18:16:58 1999
+++ php3/functions/php3_string.h Sun Dec 26 13:44:47 1999
@@ -29,15 +29,13 @@
*/
-/* $Id: php3_string.h,v 1.45 1999/10/07 22:16:58 jah Exp $ */
+/* $Id: php3_string.h,v 1.46 1999/12/26 18:44:47 rasmus Exp $ */
#ifndef _PHPSTRING_H
#define _PHPSTRING_H
-#ifndef THREAD_SAFE
extern char *strtok_string;
extern char *locale_string;
-#endif
PHP_FUNCTION(bin2hex);
extern void php3_strlen(INTERNAL_FUNCTION_PARAMETERS);
Index: php3/functions/php3_unified_odbc.h
diff -u php3/functions/php3_unified_odbc.h:1.54 php3/functions/php3_unified_odbc.h:1.55
--- php3/functions/php3_unified_odbc.h:1.54 Sat Aug 28 20:06:04 1999
+++ php3/functions/php3_unified_odbc.h Sun Dec 26 13:44:47 1999
@@ -29,7 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php3_unified_odbc.h,v 1.54 1999/08/29 00:06:04 jim Exp $ */
+/* $Id: php3_unified_odbc.h,v 1.55 1999/12/26 18:44:47 rasmus Exp $ */
#ifndef _UNIFIED_ODBC_H
#define _UNIFIED_ODBC_H
@@ -435,9 +435,7 @@
HashTable *conns;
} UODBC_MODULE;
-# ifndef THREAD_SAFE
extern UODBC_MODULE PHP3_UODBC_MODULE;
-# endif
int UODBC_ADD_RESULT(HashTable *list, UODBC_RESULT *result);
UODBC_RESULT *UODBC_GET_RESULT(HashTable *list, int count);
Index: php3/functions/posix.c
diff -u php3/functions/posix.c:1.16 php3/functions/posix.c:1.17
--- php3/functions/posix.c:1.16 Mon Nov 22 15:34:48 1999
+++ php3/functions/posix.c Sun Dec 26 13:44:47 1999
@@ -27,16 +27,12 @@
+----------------------------------------------------------------------+
*/
-/* $Id: posix.c,v 1.16 1999/11/22 20:34:48 eschmid Exp $ */
+/* $Id: posix.c,v 1.17 1999/12/26 18:44:47 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
-#if PHP_31
-# include "ext/standard/php3_string.h"
-#else
-# include "php3_string.h"
-#endif
+#include "php3_string.h"
#include "php3_posix.h"
#if HAVE_POSIX
@@ -148,7 +144,7 @@
void php3_info_posix(void)
{
- php3_printf("$Revision: 1.16 $\n");
+ php3_printf("$Revision: 1.17 $\n");
}
/* {{{ proto int posix_kill(int pid, int sig)
Index: php3/functions/post.c
diff -u php3/functions/post.c:1.124 php3/functions/post.c:1.125
--- php3/functions/post.c:1.124 Tue Jul 6 17:46:45 1999
+++ php3/functions/post.c Sun Dec 26 13:44:47 1999
@@ -27,9 +27,6 @@
+----------------------------------------------------------------------+
*/
/* $Id: */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include <stdio.h>
#include "php.h"
#include "internal_functions.h"
@@ -40,11 +37,9 @@
#include "functions/post.h"
#include "functions/url.h"
-#ifndef THREAD_SAFE
int php3_track_vars;
extern int le_uploads;
extern HashTable list;
-#endif
/*
* php3_getput()
Index: php3/functions/recode.c
diff -u php3/functions/recode.c:1.4 php3/functions/recode.c:1.5
--- php3/functions/recode.c:1.4 Mon Nov 22 17:41:39 1999
+++ php3/functions/recode.c Sun Dec 26 13:44:48 1999
@@ -27,16 +27,12 @@
+----------------------------------------------------------------------+
*/
-/* $Id: recode.c,v 1.4 1999/11/22 22:41:39 eschmid Exp $ */
+/* $Id: recode.c,v 1.5 1999/12/26 18:44:48 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
-#if PHP_31
-# include "ext/standard/php3_string.h"
-#else
-# include "php3_string.h"
-#endif
+#include "php3_string.h"
#if HAVE_RECODE
#include "php3_recode.h"
@@ -49,17 +45,9 @@
#define SAFE_STRING(s) ((s)?(s):"")
-#if defined(THREAD_SAFE)
-typedef struct recode_global_struct{
- recode_module php3_recode_module;
-} recode_global_struct;
-
-#define RECODE_GLOBAL(a) recode_globals->a
-#else
#define RECODE_GLOBAL(a) php3_recode_module.a
recode_module php3_recode_module;
extern int le_fp,le_pp;
-#endif
function_entry recode_functions[] = {
{"recode_string", php3_recode_string, NULL},
@@ -107,7 +95,7 @@
void php3_info_recode(void)
{
- php3_printf("$Revision: 1.4 $\n");
+ php3_printf("$Revision: 1.5 $\n");
}
/* {{{ proto string recode_string(string request, string str)
Index: php3/functions/reg.c
diff -u php3/functions/reg.c:1.104 php3/functions/reg.c:1.105
--- php3/functions/reg.c:1.104 Mon Nov 22 19:12:55 1999
+++ php3/functions/reg.c Sun Dec 26 13:44:48 1999
@@ -23,15 +23,12 @@
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
- | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+ | Authors: Rasmus Lerdorf <rasmus@php.net> |
| Jim Winstead <jimw@php.net> |
| Jaakko Hyvätti <jaakko@hyvatti.iki.fi> |
+----------------------------------------------------------------------+
*/
-/* $Id: reg.c,v 1.104 1999/11/23 00:12:55 eschmid Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: reg.c,v 1.105 1999/12/26 18:44:48 rasmus Exp $ */
#include <stdio.h>
#include "php.h"
#include "internal_functions.h"
@@ -64,9 +61,6 @@
call to ereg() or eregi() with the optional third argument. */
#define NS 10
-
-#ifndef THREAD_SAFE
-
typedef struct {
regex_t preg;
int cflags;
@@ -107,11 +101,6 @@
#define _php3_regfree(a);
-#else
-#define _php3_regcomp(a,b,c) regcomp(a,b,c)
-#define _php3_regfree(a) regfree(a)
-#endif
-
/*
* _php3_reg_eprint - convert error number to name
*/
@@ -627,29 +616,23 @@
}
/* }}} */
-#ifndef THREAD_SAFE
static void _free_reg_cache(void *data)
{
reg_cache *rc = (reg_cache *) data;
regfree(&rc->preg);
}
-#endif
static int php3_minit_regex(INIT_FUNC_ARGS)
{
-#ifndef THREAD_SAFE
_php3_hash_init(&ht_rc, 0, NULL, _free_reg_cache, 1);
-#endif
return SUCCESS;
}
static int php3_mshutdown_regex(void)
{
-#ifndef THREAD_SAFE
_php3_hash_destroy(&ht_rc);
-#endif
return SUCCESS;
}
Index: php3/functions/rpc.c
diff -u php3/functions/rpc.c:1.2 php3/functions/rpc.c:1.3
--- php3/functions/rpc.c:1.2 Thu Apr 22 09:19:50 1999
+++ php3/functions/rpc.c Sun Dec 26 13:44:48 1999
@@ -27,11 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: rpc.c,v 1.2 1999/04/22 13:19:50 ssb Exp $ */
-
-#ifdef THREAD_SAFE
-# include "tls.h"
-#endif
+/* $Id: rpc.c,v 1.3 1999/12/26 18:44:48 rasmus Exp $ */
#define IS_EXT_MODULE
#include "php.h"
@@ -59,63 +55,18 @@
* different "unsigned short" and "unsigned long" sizes.
*
*/
-
-/* {{{ thread safety stuff */
-#ifdef THREAD_SAFE
-# define RPC_GLOBAL(a) rpc_globals->a
-# define RPC_TLS_VARS \
- rpc_global_struct *rpc_globals = TlsGetValue(RPCTls);
-
-void *rpc_mutex;
-DWORD RPCTls;
-static int numthreads=0;
-
-typedef struct rpc_global_struct {
- rpc_module php3_rpc_module;
-} rpc_global_struct;
-
-#else /* !defined(THREAD_SAFE) */
-# define RPC_GLOBAL(a) a
-# define RPC_TLS_VARS
+#define RPC_GLOBAL(a) a
+#define RPC_TLS_VARS
rpc_module php3_rpc_module;
-#endif /* defined(THREAD_SAFE) */
-
-/* }}} */
/* {{{ dynamic loading stuff */
#if COMPILE_DL
php3_module_entry *get_module() { return &rpc_module_entry; };
-# if (WIN32|WINNT) && defined(THREAD_SAFE)
-
-/* NOTE: You should have an rpc.def file where you export DllMain */
-BOOL WINAPI DllMain(HANDLE hModule, DWORD ul_reason_for_call,
- LPVOID lpReserved)
-{
- switch (ul_reason_for_call) {
- case DLL_PROCESS_ATTACH:
- if ((RPCTls = TlsAlloc()) == 0xFFFFFFFF){
- return 0;
- }
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
- break;
- case DLL_PROCESS_DETACH:
- if (!TlsFree(RPCTls)) {
- return 0;
- }
- break;
- }
- return 1;
-}
-
-# endif /* thread safe on Windows */
#endif /* COMPILE_DL */
/* }}} */
Index: php3/functions/string.c
diff -u php3/functions/string.c:1.205 php3/functions/string.c:1.206
--- php3/functions/string.c:1.205 Tue Dec 7 03:19:41 1999
+++ php3/functions/string.c Sun Dec 26 13:44:48 1999
@@ -29,11 +29,7 @@
+----------------------------------------------------------------------+
*/
-
-/* $Id: string.c,v 1.205 1999/12/07 08:19:41 thies Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: string.c,v 1.206 1999/12/26 18:44:48 rasmus Exp $ */
#include <stdio.h>
#include "php.h"
#include "internal_functions.h"
@@ -408,19 +404,15 @@
/* }}} */
-#ifndef THREAD_SAFE
char *strtok_string;
-#endif
/* {{{ proto string strtok([string str,] string token)
Tokenize a string */
void php3_strtok(INTERNAL_FUNCTION_PARAMETERS)
{
pval *str, *tok;
-#ifndef THREAD_SAFE
static char *strtok_pos1 = NULL;
static char *strtok_pos2 = NULL;
-#endif
char *token = NULL, *tokp=NULL;
char *first = NULL;
int argc;
@@ -1320,9 +1312,7 @@
{
extern int sys_nerr;
extern char *sys_errlist[];
-#ifndef THREAD_SAFE
static char str_ebuf[40];
-#endif
if ((unsigned int)errnum < sys_nerr) return(sys_errlist[errnum]);
(void)sprintf(STATIC(str_ebuf), "Unknown error: %d", errnum);
@@ -1809,10 +1799,7 @@
}
/* }}} */
-
-#ifndef THREAD_SAFE
char *locale_string;
-#endif
/* {{{ proto string setlocale(string category, string locale)
Set locale information */
Index: php3/functions/syslog.c
diff -u php3/functions/syslog.c:1.46 php3/functions/syslog.c:1.47
--- php3/functions/syslog.c:1.46 Sat Jul 3 01:40:21 1999
+++ php3/functions/syslog.c Sun Dec 26 13:44:48 1999
@@ -27,10 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: syslog.c,v 1.46 1999/07/03 05:40:21 bjh Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: syslog.c,v 1.47 1999/12/26 18:44:48 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
Index: php3/functions/unified_odbc.c
diff -u php3/functions/unified_odbc.c:1.110 php3/functions/unified_odbc.c:1.111
--- php3/functions/unified_odbc.c:1.110 Mon Nov 22 18:21:29 1999
+++ php3/functions/unified_odbc.c Sun Dec 26 13:44:48 1999
@@ -29,18 +29,12 @@
+----------------------------------------------------------------------+
*/
-/* $Id: unified_odbc.c,v 1.110 1999/11/22 23:21:29 eschmid Exp $ */
+/* $Id: unified_odbc.c,v 1.111 1999/12/26 18:44:48 rasmus Exp $ */
/* This file is based on the Adabas D extension.
* Adabas D will no longer be supported as separate module.
*/
#define IS_EXT_MODULE
-#if !PHP_31
-#undef THREAD_SAFE
-#endif
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#if !(WIN32|WINNT)
#include "config.h"
#include "build-defs.h"
@@ -49,38 +43,17 @@
#include "php.h"
#include "internal_functions.h"
-#if PHP_31
-# include "ext/phpdl.h"
-# include "ext/standard/php3_string.h"
-#else
-# include "dl/phpdl.h"
-# include "php3_string.h"
-#endif
+#include "dl/phpdl.h"
+#include "php3_string.h"
#include "php3_unified_odbc.h"
#include "head.h"
#include "snprintf.h"
#if HAVE_UODBC
-#ifdef THREAD_SAFE
-
-void *UODBC_MUTEX;
-DWORD UODBC_TLS;
-static int numthreads=0;
-
-typedef struct UODBC_GLOBAL_STRUCT {
- UODBC_MODULE PHP3_UODBC_MODULE;
-} UODBC_GLOBAL_STRUCT;
-
-#define UODBC_GLOBAL(a) UODBC_GLOBALS->a
-
-#define UODBC_TLS_VARS UODBC_GLOBAL_STRUCT *UODBC_GLOBALS = TlsGetValue(UODBC_TLS);
-
-#else
UODBC_MODULE PHP3_UODBC_MODULE;
#define UODBC_GLOBAL(a) a
#define UODBC_TLS_VARS
-#endif
function_entry UODBC_FUNCTIONS[] = {
UODBC_FE(setoption, NULL),
@@ -262,29 +235,8 @@
RETCODE rc;
#endif
-#if defined(THREAD_SAFE)
- UODBC_GLOBAL_STRUCT *UODBC_GLOBALS;
-
- PHP3_MUTEX_ALLOC(UODBC_MUTEX);
- PHP3_MUTEX_LOCK(UODBC_MUTEX);
- numthreads++;
- if (numthreads==1){
- if (!PHP3_TLS_PROC_STARTUP(UODBC_TLS)){
- PHP3_MUTEX_UNLOCK(UODBC_MUTEX);
- PHP3_MUTEX_FREE(UODBC_MUTEX);
- return FAILURE;
- }
- }
- PHP3_MUTEX_UNLOCK(UODBC_MUTEX);
- if(!PHP3_TLS_THREAD_INIT(UODBC_TLS,UODBC_GLOBALS,UODBC_GLOBAL_STRUCT)){
- PHP3_MUTEX_FREE(UODBC_MUTEX);
- return FAILURE;
- }
-#endif
-
SQLAllocEnv(&UODBC_GLOBAL(PHP3_UODBC_MODULE).henv);
-#if !PHP_31
cfg_get_string(ODBC_INI_VAR(default_db),
&UODBC_GLOBAL(PHP3_UODBC_MODULE).defDB);
cfg_get_string(ODBC_INI_VAR(default_user),
@@ -306,11 +258,6 @@
== FAILURE) {
UODBC_GLOBAL(PHP3_UODBC_MODULE).max_links = -1;
}
-#else
- UODBC_GLOBAL(PHP3_UODBC_MODULE).allow_persistent = -1;
- UODBC_GLOBAL(PHP3_UODBC_MODULE).max_persistent = -1;
- UODBC_GLOBAL(PHP3_UODBC_MODULE).max_links = -1;
-#endif
UODBC_GLOBAL(PHP3_UODBC_MODULE).num_persistent = 0;
@@ -363,10 +310,6 @@
UODBC_GLOBAL(PHP3_UODBC_MODULE).defConn = -1;
UODBC_GLOBAL(PHP3_UODBC_MODULE).num_links =
UODBC_GLOBAL(PHP3_UODBC_MODULE).num_persistent;
-#if PHP_31
- UODBC_GLOBAL(PHP3_UODBC_MODULE).defaultlrl = 4096;
- UODBC_GLOBAL(PHP3_UODBC_MODULE).defaultbinmode = 1;
-#else
if (cfg_get_long(ODBC_INI_VAR(defaultlrl), &UODBC_GLOBAL(PHP3_UODBC_MODULE).defaultlrl)
== FAILURE){
UODBC_GLOBAL(PHP3_UODBC_MODULE).defaultlrl = 4096;
@@ -374,7 +317,6 @@
if (cfg_get_long(ODBC_INI_VAR(defaultbinmode),
&UODBC_GLOBAL(PHP3_UODBC_MODULE).defaultbinmode) == FAILURE){
UODBC_GLOBAL(PHP3_UODBC_MODULE).defaultbinmode = 1;
}
-#endif
return SUCCESS;
}
@@ -383,18 +325,6 @@
UODBC_TLS_VARS;
SQLFreeEnv(UODBC_GLOBAL(PHP3_UODBC_MODULE).henv);
-#ifdef THREAD_SAFE
- PHP3_TLS_THREAD_FREE(UODBC_GLOBALS);
- PHP3_MUTEX_LOCK(UODBC_MUTEX);
- numthreads--;
- if (!numthreads) {
- PHP3_TLS_PROC_SHUTDOWN(UODBC_TLS);
- PHP3_MUTEX_UNLOCK(UODBC_MUTEX);
- PHP3_MUTEX_FREE(UODBC_MUTEX);
- return SUCCESS;
- }
- PHP3_MUTEX_UNLOCK(UODBC_MUTEX);
-#endif
return SUCCESS;
}
@@ -1374,9 +1304,6 @@
UDWORD crow;
UWORD RowStatus[1];
#endif
-#if !defined(COMPILE_DL) && defined(THREAD_SAFE)
- TLS_VARS;
-#endif
field_ind = -1;
field = NULL;
@@ -1558,9 +1485,6 @@
UDWORD crow;
UWORD RowStatus[1];
#endif
-#if !defined(COMPILE_DL) && defined(THREAD_SAFE)
- TLS_VARS
-#endif
numArgs = ARG_COUNT(ht);
if (numArgs == 1){
@@ -1938,11 +1862,7 @@
return_value->value.lval =
php3_plist_insert(db_conn, UODBC_GLOBAL(PHP3_UODBC_MODULE).le_pconn);
new_index_ptr.ptr = (void *) return_value->value.lval;
-#ifdef THREAD_SAFE
- new_index_ptr.type = _php3_le_index_ptr();
-#else
new_index_ptr.type = le_index_ptr;
-#endif
if (_php3_hash_update(plist,hashed_details,hashed_len + 1,(void *) &new_index_ptr,
sizeof(list_entry),NULL)==FAILURE) {
SQLDisconnect(db_conn->hdbc);
@@ -1958,11 +1878,7 @@
return_value->value.lval =
php3_list_insert(db_conn, UODBC_GLOBAL(PHP3_UODBC_MODULE).le_conn);
new_index_ptr.ptr = (void *) return_value->value.lval;
-#ifdef THREAD_SAFE
- new_index_ptr.type = _php3_le_index_ptr();
-#else
new_index_ptr.type = le_index_ptr;
-#endif
if (_php3_hash_update(list,hashed_details,hashed_len + 1,(void *) &new_index_ptr,
sizeof(list_entry),NULL)==FAILURE) {
SQLDisconnect(db_conn->hdbc);
@@ -1977,11 +1893,7 @@
} else {
/* we are already connected */
-#ifdef THREAD_SAFE
- if (index_ptr->type != _php3_le_index_ptr()) {
-#else
if (index_ptr->type != le_index_ptr) {
-#endif
efree(hashed_details);
RETURN_FALSE;
}
Index: php3/functions/uniqid.c
diff -u php3/functions/uniqid.c:1.38 php3/functions/uniqid.c:1.39
--- php3/functions/uniqid.c:1.38 Fri Sep 17 13:51:56 1999
+++ php3/functions/uniqid.c Sun Dec 26 13:44:48 1999
@@ -27,10 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: uniqid.c,v 1.38 1999/09/17 17:51:56 sas Exp $ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: uniqid.c,v 1.39 1999/12/26 18:44:48 rasmus Exp $ */
#include "php.h"
#include "internal_functions.h"
Index: php3/functions/url.c
diff -u php3/functions/url.c:1.43 php3/functions/url.c:1.44
--- php3/functions/url.c:1.43 Fri Jan 1 12:59:19 1999
+++ php3/functions/url.c Sun Dec 26 13:44:48 1999
@@ -26,7 +26,7 @@
| Author: Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
-/* $Id: url.c,v 1.43 1999/01/01 17:59:19 zeev Exp $ */
+/* $Id: url.c,v 1.44 1999/12/26 18:44:48 rasmus Exp $ */
#include <stdlib.h>
#include <string.h>
@@ -34,9 +34,6 @@
#include <sys/types.h>
/* php.h includes the correct regex.h */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h"
#include "internal_functions.h"
Index: php3/functions/var.c
diff -u php3/functions/var.c:1.17 php3/functions/var.c:1.18
--- php3/functions/var.c:1.17 Sat Nov 6 04:07:17 1999
+++ php3/functions/var.c Sun Dec 26 13:44:48 1999
@@ -27,11 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: var.c,v 1.17 1999/11/06 09:07:17 thies Exp $ */
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+/* $Id: var.c,v 1.18 1999/12/26 18:44:48 rasmus Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
Index: php3/functions/xml.c
diff -u php3/functions/xml.c:1.30 php3/functions/xml.c:1.31
--- php3/functions/xml.c:1.30 Mon Nov 22 17:41:39 1999
+++ php3/functions/xml.c Sun Dec 26 13:44:48 1999
@@ -27,24 +27,16 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml.c,v 1.30 1999/11/22 22:41:39 eschmid Exp $ */
+/* $Id: xml.c,v 1.31 1999/12/26 18:44:48 rasmus Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
-# if PHP_31
-# include "../phpdl.h"
-# else
# include "dl/phpdl.h"
-# endif
#endif
#include "php.h"
#include "internal_functions.h"
#include "php3_xml.h"
#include "variables.h"
-#if defined(THREAD_SAFE) && !PHP_31
-#undef THREAD_SAFE
-#endif
-
#if HAVE_LIBEXPAT
# include "php3_list.h"
@@ -68,29 +60,11 @@
* - Weird things happen with <![CDATA[]]> sections.
*/
-/* {{{ thread safety stuff */
+#define XML_GLOBAL(a) a
+#define XML_TLS_VARS
-# ifdef THREAD_SAFE
-# define XML_GLOBAL(a) xml_globals->a
-# define XML_TLS_VARS xml_global_struct *xml_globals = TlsGetValue(XMLTls);
-
-void *xml_mutex;
-DWORD XMLTls;
-static int numthreads=0;
-
-typedef struct xml_global_struct {
- xml_module php3_xml_module;
-} xml_global_struct;
-
-# else /* !defined(THREAD_SAFE) */
-# define XML_GLOBAL(a) a
-# define XML_TLS_VARS
-
xml_module php3_xml_module;
-# endif /* defined(THREAD_SAFE) */
-
-/* }}} */
/* {{{ dynamically loadable module stuff */
# if COMPILE_DL
@@ -185,25 +159,6 @@
int php3_minit_xml(INIT_FUNC_ARGS)
{
-#if defined(THREAD_SAFE)
- xml_global_struct *xml_globals;
- PHP3_MUTEX_ALLOC(xml_mutex);
- PHP3_MUTEX_LOCK(xml_mutex);
- numthreads++;
- if (numthreads==1){
- if (!PHP3_TLS_PROC_STARTUP(XMLTls)){
- PHP3_MUTEX_UNLOCK(xml_mutex);
- PHP3_MUTEX_FREE(xml_mutex);
- return FAILURE;
- }
- }
- PHP3_MUTEX_UNLOCK(xml_mutex);
- if(!PHP3_TLS_THREAD_INIT(XMLTls,xml_globals,xml_global_struct)){
- PHP3_MUTEX_FREE(xml_mutex);
- return FAILURE;
- }
-#endif
-
XML_GLOBAL(php3_xml_module).le_xml_parser =
register_list_destructors(xml_destroy_parser, NULL);
@@ -255,18 +210,6 @@
int php3_mshutdown_xml()
{
XML_TLS_VARS;
-#ifdef THREAD_SAFE
- PHP3_TLS_THREAD_FREE(xml_globals);
- PHP3_MUTEX_LOCK(xml_mutex);
- numthreads--;
- if (numthreads<1) {
- PHP3_TLS_PROC_SHUTDOWN(XMLTls);
- PHP3_MUTEX_UNLOCK(xml_mutex);
- PHP3_MUTEX_FREE(xml_mutex);
- return SUCCESS;
- }
- PHP3_MUTEX_UNLOCK(xml_mutex);
-#endif
return SUCCESS;
}
Index: php3/win32/apache.dsp
diff -u php3/win32/apache.dsp:1.1 php3/win32/apache.dsp:1.2
--- php3/win32/apache.dsp:1.1 Mon Jun 28 17:43:31 1999
+++ php3/win32/apache.dsp Sun Dec 26 13:44:49 1999
@@ -42,7 +42,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "\usr\src\phpcvs\php3" /I "regex\\" /I
"\usr\src\apache_1.3b3\src\main" /I "\usr\src\apache_1.3b3\src\regex" /D
"NDEBUG" /D "THREAD_SAFE" /D "APACHE" /D "MSVC5" /D
"WIN32" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "\usr\src\phpcvs\php3" /I "regex\\" /I
"\usr\src\apache_1.3b3\src\main" /I "\usr\src\apache_1.3b3\src\regex" /D
"NDEBUG" /D "APACHE" /D "MSVC5" /D "WIN32" /D
"_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -68,7 +68,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "\usr\src\phpcvs\php3" /I
"regex\\" /I "\usr\src\apache_1.3b3\src\main" /I
"\usr\src\apache_1.3b3\src\regex" /D "DEBUG" /D "_DEBUG" /D
"THREAD_SAFE" /D "APACHE" /D "MSVC5" /D "WIN32" /D
"_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "\usr\src\phpcvs\php3" /I
"regex\\" /I "\usr\src\apache_1.3b3\src\main" /I
"\usr\src\apache_1.3b3\src\regex" /D "DEBUG" /D "_DEBUG" /D
"APACHE" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
Index: php3/win32/dbase.dsp
diff -u php3/win32/dbase.dsp:1.1 php3/win32/dbase.dsp:1.2
--- php3/win32/dbase.dsp:1.1 Mon Jun 28 17:43:31 1999
+++ php3/win32/dbase.dsp Sun Dec 26 13:44:50 1999
@@ -43,7 +43,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../dbase" /I ".." /I "include"
/D DBASE=1 /D "NDEBUG" /D "THREAD_SAFE" /D "COMPILE_DL" /D
"MSVC5" /D "WIN32" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../dbase" /I ".." /I "include"
/D DBASE=1 /D "NDEBUG" /D "COMPILE_DL" /D "MSVC5" /D "WIN32"
/D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -69,7 +69,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../dbase" /I ".." /I
"include" /D DBASE=1 /D "DEBUG" /D "_DEBUG" /D "THREAD_SAFE"
/D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /YX /FD
/c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../dbase" /I ".." /I
"include" /D DBASE=1 /D "DEBUG" /D "_DEBUG" /D "COMPILE_DL"
/D "MSVC5" /D "WIN32" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
Index: php3/win32/filepro.dsp
diff -u php3/win32/filepro.dsp:1.1 php3/win32/filepro.dsp:1.2
--- php3/win32/filepro.dsp:1.1 Mon Jun 28 17:43:31 1999
+++ php3/win32/filepro.dsp Sun Dec 26 13:44:50 1999
@@ -43,7 +43,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /I "include" /D HAVE_FILEPRO=1 /D
"NDEBUG" /D "THREAD_SAFE" /D "MSVC5" /D "COMPILE_DL" /D
"WIN32" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /I "include" /D HAVE_FILEPRO=1 /D
"NDEBUG" /D "MSVC5" /D "COMPILE_DL" /D "WIN32" /D
"_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -69,7 +69,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "include" /D
HAVE_FILEPRO=1 /D "DEBUG" /D "_DEBUG" /D "THREAD_SAFE" /D
"MSVC5" /D "COMPILE_DL" /D "WIN32" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "include" /D
HAVE_FILEPRO=1 /D "DEBUG" /D "_DEBUG" /D "MSVC5" /D
"COMPILE_DL" /D "WIN32" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
Index: php3/win32/imap4.dsp
diff -u php3/win32/imap4.dsp:1.1 php3/win32/imap4.dsp:1.2
--- php3/win32/imap4.dsp:1.1 Mon Jun 28 17:43:31 1999
+++ php3/win32/imap4.dsp Sun Dec 26 13:44:50 1999
@@ -43,7 +43,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /I "include" /D HAVE_IMAP=1 /D
"NDEBUG" /D "MSVC5" /D "THREAD_SAFE" /D "COMPILE_DL" /D
"WIN32" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /I "include" /D HAVE_IMAP=1 /D
"NDEBUG" /D "MSVC5" /D "COMPILE_DL" /D "WIN32" /D
"_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -69,7 +69,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "include" /D HAVE_IMAP=1
/D "DEBUG" /D "_DEBUG" /D "MSVC5" /D "THREAD_SAFE" /D
"COMPILE_DL" /D "WIN32" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "include" /D HAVE_IMAP=1
/D "DEBUG" /D "_DEBUG" /D "MSVC5" /D "COMPILE_DL" /D
"WIN32" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
Index: php3/win32/pwd.c
diff -u php3/win32/pwd.c:1.11 php3/win32/pwd.c:1.12
--- php3/win32/pwd.c:1.11 Mon Dec 28 04:44:04 1998
+++ php3/win32/pwd.c Sun Dec 26 13:44:50 1999
@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: pwd.c,v 1.11 1998/12/28 09:44:04 sas Exp $
+ $Id: pwd.c,v 1.12 1999/12/26 18:44:50 rasmus Exp $
*/
/* This 'implementation' is conjectured from the use of this functions in
@@ -23,9 +23,6 @@
much useful things under MS-DOS, but using them avoids many "#ifdef
MSDOS" in ported UN*X code ... */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h" /*php specific */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -37,9 +34,7 @@
#include "pwd.h"
#include "grp.h"
-#ifndef THREAD_SAFE
static struct passwd pw; /* should we return a malloc()'d structure */
-#endif
static char *home_dir = "."; /* we feel (no|every)where at home */
static char *login_shell = "not command.com!";
Index: php3/win32/sendmail.c
diff -u php3/win32/sendmail.c:1.27 php3/win32/sendmail.c:1.28
--- php3/win32/sendmail.c:1.27 Wed Sep 1 06:23:38 1999
+++ php3/win32/sendmail.c Sun Dec 26 13:44:50 1999
@@ -1,4 +1,4 @@
-/* $Id: sendmail.c,v 1.27 1999/09/01 10:23:38 fmk Exp $ */
+/* $Id: sendmail.c,v 1.28 1999/12/26 18:44:50 rasmus Exp $ */
/*
* PHP Sendmail for Windows.
@@ -18,10 +18,6 @@
* from http://virtual.icr.com.au:80/jgaa/cgi-bin.htm
*
*/
-
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h" /*php specific */
#include <stdio.h>
#include <stdlib.h>
@@ -49,7 +45,6 @@
static char *months[] =
{"Jan", "Feb", "Mar", "Apr", "May",
"Jun", "Jul", "Aug", "Sep", "Oct",
"Nov", "Dec"};
-#ifndef THREAD_SAFE
char Buffer[MAIL_BUFFER_SIZE];
// socket related data
@@ -62,7 +57,6 @@
char *AppName;
char MailHost[HOST_NAME_LEN];
char LocalHost[HOST_NAME_LEN];
-#endif
char seps[] = " ,\t\n";
char *php_mailer = "PHP 3.0 WIN32";
Index: php3/win32/snmp.dsp
diff -u php3/win32/snmp.dsp:1.1 php3/win32/snmp.dsp:1.2
--- php3/win32/snmp.dsp:1.1 Mon Jun 28 17:43:31 1999
+++ php3/win32/snmp.dsp Sun Dec 26 13:44:51 1999
@@ -43,7 +43,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /I "include" /D HAVE_SNMP=1 /D
"THREAD_SAFE" /D "NDEBUG" /D "MSVC5" /D "COMPILE_DL" /D
"WIN32" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /I "include" /D HAVE_SNMP=1 /D
"NDEBUG" /D "MSVC5" /D "COMPILE_DL" /D "WIN32" /D
"_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -69,7 +69,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "include" /D HAVE_SNMP=1
/D "THREAD_SAFE" /D "DEBUG" /D "_DEBUG" /D "MSVC5" /D
COMPILE_DL=1 /D "WIN32" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "include" /D HAVE_SNMP=1
/D "DEBUG" /D "_DEBUG" /D "MSVC5" /D COMPILE_DL=1 /D "WIN32"
/D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
Index: php3/win32/time.c
diff -u php3/win32/time.c:1.13 php3/win32/time.c:1.14
--- php3/win32/time.c:1.13 Mon Dec 28 04:44:05 1998
+++ php3/win32/time.c Sun Dec 26 13:44:51 1999
@@ -9,15 +9,12 @@
*
* Modified by Shane Caraveo for use with PHP
*
- * $Id: time.c,v 1.13 1998/12/28 09:44:05 sas Exp $
+ * $Id: time.c,v 1.14 1999/12/26 18:44:51 rasmus Exp $
*
*****************************************************************************/
/* Include stuff ************************************************************ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "time.h"
#include "unistd.h"
#include "signal.h"
@@ -77,10 +74,8 @@
#if HAVE_SETITIMER
-#ifndef THREAD_SAFE
unsigned int proftimer, virttimer, realtimer;
extern LPMSG phpmsg;
-#endif
struct timer_msg {
int signal;
Index: php3/win32/winutil.c
diff -u php3/win32/winutil.c:1.4 php3/win32/winutil.c:1.5
--- php3/win32/winutil.c:1.4 Fri Jan 30 19:22:42 1998
+++ php3/win32/winutil.c Sun Dec 26 13:44:51 1999
@@ -1,16 +1,10 @@
-#ifdef THREAD_SAFE
-#include "tls.h"
-#else
#define TLS_VARS
#define GLOBAL(a) a
-#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "winutil.h"
-#ifndef THREAD_SAFE
static char Win_Error_msg[256];
-#endif
char *php3_win_err(void)
{
Index: php3/win32/wsyslog.c
diff -u php3/win32/wsyslog.c:1.16 php3/win32/wsyslog.c:1.17
--- php3/win32/wsyslog.c:1.16 Mon Dec 28 04:44:05 1998
+++ php3/win32/wsyslog.c Sun Dec 26 13:44:51 1999
@@ -2,7 +2,7 @@
* This file modified from sources for imap4 for use
* in PHP 3
*
- * $Id: wsyslog.c,v 1.16 1998/12/28 09:44:05 sas Exp $
+ * $Id: wsyslog.c,v 1.17 1999/12/26 18:44:51 rasmus Exp $
*/
/*
* Program: Unix compatibility routines
@@ -52,19 +52,14 @@
* Lift a leg, Yunie. Luv ya forever!!!!
*/
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
#include "php.h" /*php specific */
#include "syslog.h"
#include <stdio.h>
#include <fcntl.h>
#include <process.h>
-#ifndef THREAD_SAFE
static char *loghdr; /* log file header string */
static HANDLE loghdl = NULL; /* handle of event source */
-#endif
void closelog(void)
{
Index: php3/win32/zlib.dsp
diff -u php3/win32/zlib.dsp:1.1 php3/win32/zlib.dsp:1.2
--- php3/win32/zlib.dsp:1.1 Mon Jun 28 17:43:31 1999
+++ php3/win32/zlib.dsp Sun Dec 26 13:44:51 1999
@@ -69,7 +69,7 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "include" /D HAVE_ZLIB=1
/D "DEBUG" /D "_DEBUG" /D "MSVC5" /D "COMPILE_DL" /D
"THREAD_SAFE" /D "WIN32" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "include" /D HAVE_ZLIB=1
/D "DEBUG" /D "_DEBUG" /D "MSVC5" /D "COMPILE_DL" /D
"WIN32" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"