]> granicus.if.org Git - php/commitdiff
Remove tls.[ch]
authorZeev Suraski <zeev@php.net>
Fri, 23 Apr 1999 20:06:01 +0000 (20:06 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 23 Apr 1999 20:06:01 +0000 (20:06 +0000)
55 files changed:
ext/apache/apache.c
ext/bcmath/number.c
ext/dbase/dbase.c
ext/ereg/ereg.c
ext/filepro/filepro.c
ext/gd/gd.c
ext/imap/imap.h
ext/informix/ifx.ec
ext/ldap/ldap.c
ext/msql/msql.c
ext/standard/base64.c
ext/standard/basic_functions.c
ext/standard/browscap.c
ext/standard/datetime.c
ext/standard/dir.c
ext/standard/dl.c
ext/standard/dns.c
ext/standard/exec.c
ext/standard/file.c
ext/standard/filestat.c
ext/standard/formatted_print.c
ext/standard/fsock.c
ext/standard/head.c
ext/standard/html.c
ext/standard/info.c
ext/standard/link.c
ext/standard/mail.c
ext/standard/math.c
ext/standard/md5.c
ext/standard/microtime.c
ext/standard/mime.c
ext/standard/pack.c
ext/standard/pageinfo.c
ext/standard/post.c
ext/standard/reg.c
ext/standard/string.c
ext/standard/syslog.c
ext/standard/uniqid.c
ext/standard/url.c
ext/standard/var.c
ext/zlib/zlib.c
fhttpd.c
main/fopen_wrappers.c
main/main.c
main/safe_mode.c
mod_php3.c
php3_realpath.c
request_info.c
tls.c [deleted file]
tls.h [deleted file]
win32/pwd.c
win32/sendmail.c
win32/time.c
win32/winutil.c
win32/wsyslog.c

index 1c7f9de43e099dc0a798b9d7b6e0e47f8a4b2338..e3129a36f77883bdb9c226e7452913ab839d190a 100644 (file)
@@ -30,9 +30,6 @@
  */
 
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "ext/standard/head.h"
 #include "php_globals.h"
index 868c629aac957530e1cd6b551f35746fb3f44fa5..fbacf5bc6779757a0678ffe541e552e92a5001ca 100644 (file)
@@ -55,9 +55,6 @@
 
 *************************************************************************/
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #if 0
 #include "bcdefs.h"
 #include "proto.h"
index 46b1162583fbfb48235e4ecdd26799eaa3896ee7..cd9ba2e8ad372486e3c19d903f4f46427624e603 100644 (file)
@@ -30,9 +30,6 @@
 #include "dl/phpdl.h"
 #endif
 
-#if defined(THREAD_SAFE)
-#include "tls.h"
-#endif
 #include <stdlib.h>
 
 #include "php.h"
index 8b81e82e7fe2fce7de99ae596aa529396eca618a..4f37bf133a9ce0a4951253f18437d509675a7ee1 100644 (file)
@@ -29,9 +29,7 @@
    +----------------------------------------------------------------------+
  */
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include <stdio.h>
 #include "php.h"
 #include "php3_string.h"
index ab055fc4426bfe1b11c0ab7f37b16f6d423e7104..6935530d3510a52ab32ff4b6227781b1d1c36c67 100644 (file)
@@ -33,9 +33,7 @@
   web site at http://www.fileproplus.com/
 
  */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 #include "safe_mode.h"
 #include "fopen-wrappers.h"
index 884908db12c6c21d4698df1450c1103a358dfd28..d0f0f9db22678143df94dc7b9fe09873c06cd177 100644 (file)
@@ -35,9 +35,7 @@
    Cold Spring Harbor Labs. */
 
 /* Note that there is no code from the gd package in this file */
-#ifdef THREAD_SAFE
-# include "tls.h"
-#endif
+
 #include "php.h"
 #include "ext/standard/head.h"
 #include <math.h>
index 421ca5e76ed897cbe4ef18da839546942a041fcf..56c75ad74365001da16b049404e5f0245adcc57c 100644 (file)
@@ -8,9 +8,6 @@
 
 #if HAVE_IMAP
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #ifndef MSVC5
 #include "build-defs.h"
 #endif
index 519045d369d7988bf71597cbac0aaadab1ced749..2f6ce7967544d8ee71484378778c42c46c3fe09e 100644 (file)
@@ -101,12 +101,6 @@ Changes 12.11.1998 (danny.heijl@cevi.be)
 #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>
index 85207f9629931ed3ca68b2c7783ec409e7fe532d..f85b0dcf7cdf38f84311e3e92b17e61edb3dad44 100644 (file)
 
 /* $Id$ */
 #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
 
 #include "php.h"
 
index dbeb4c7f388eb860622242cab908a11960133c12..acf687174bb5ba5ed98d8a6dc211d427b74fc7d8 100644 (file)
@@ -28,9 +28,6 @@
  */
  
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 
 #include "php.h"
 #if COMPILE_DL
index 392f2451acdd039eec16778539206ecf7719e3a1..3099934764683f4d6f21ac30d28e0a0bee0f9955 100644 (file)
@@ -28,9 +28,6 @@
  */
 /* $Id$ */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include <string.h>
 
 #include "php.h"
index e2865ac83f344a1411216e40ef33b928b9735a7c..92d3d6bcffb32a1a96588bf5e529341c2f3099b4 100644 (file)
@@ -30,9 +30,7 @@
 
 
 #define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? (p)->value.obj.properties : NULL)))
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 #include "php_ini.h"
 #include "internal_functions_registry.h"
index 4045a698a1d2861660335ca7488c194d63fd7172..3fe150070816298b99d6042c3a927945e1f9863c 100644 (file)
@@ -27,9 +27,6 @@
    +----------------------------------------------------------------------+
  */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "php3_browscap.h"
 #include "php_ini.h"
index 191371a8c2b1f8d18511d7ce546b1fb296fe5ccd..3c0cf138b040bc7e526dff8b49fff48431fb3aac 100644 (file)
@@ -33,9 +33,6 @@
 /* $Id$ */
 
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "zend_operators.h"
 #include "datetime.h"
index 1edd10d374c2ae9ceabff835e6f6a264289ac8a9..546f31554bc214f06ba69454dde9131e8836b20b 100644 (file)
@@ -29,9 +29,6 @@
 
 /* $Id$ */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "fopen-wrappers.h"
 
index e10ba466c1ca766f1d1cd36176c7a0ec4e15f238..60ae23c2d6dd7fcb95bfd8a339f3e30435f6208a 100644 (file)
@@ -29,9 +29,6 @@
    +----------------------------------------------------------------------+
  */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "dl.h"
 #include "php_globals.h"
index 5a338856d00caa5b50fc6022aa57001c2f473a26..2bec92bb88317d272a9d32a3ac2ee4331663481f 100644 (file)
@@ -30,9 +30,6 @@
 
 /* $Id$ */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #if HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
index af35ae131e1207be2ea08383758f81cd674001bd..c4ea465c86085dc39f36c91537737b5ff3426d70 100644 (file)
@@ -28,9 +28,6 @@
  */
 /* $Id$ */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include <stdio.h>
 #include "php.h"
 #include <ctype.h>
index 86e499e28fa02a35ba3309d787fd2db6462e1411..5e34d73795a81181ec49173a4beee646546dd4e6 100644 (file)
@@ -27,9 +27,6 @@
    +----------------------------------------------------------------------+
  */
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "php_globals.h"
 #include "ext/standard/flock_compat.h"
index 98a61563530044aebe9cb106d0a4c720182b82ac..bd539e1d5d02601cf7f4d05ac002948265591c56 100644 (file)
@@ -28,9 +28,7 @@
  */
 
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 #include "safe_mode.h"
 #include "fopen-wrappers.h"
index 956f0071fdd32a253301b1789abfb521ab081c24..4efb9492926937925e7209d1046336e540b3eaac 100644 (file)
@@ -30,9 +30,6 @@
 /* $Id$ */
 
 #include <math.h>                              /* modf() */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "ext/standard/head.h"
 #include "php3_string.h"
index 6e210281cf36a240c7f0fda0caf43d8346113795..c699136ceba96d3ede6e3beb0e4f37f4aadbff6e 100644 (file)
@@ -28,9 +28,7 @@
    +----------------------------------------------------------------------+
 */
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 #include <stdlib.h>
 #if HAVE_UNISTD_H
index 70429bee34613c0a597fccdf220bd23a6a40d29d..6c2772a5479b0767827d4cfbf1544eb05cbd06f0 100644 (file)
@@ -27,9 +27,7 @@
    +----------------------------------------------------------------------+
  */
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include <stdio.h>
 #include "php.h"
 #include "ext/standard/php3_standard.h"
index f15131523dbc6f48fc932bf603fef062789629e2..49baf94b4183a57725f81dbacf2fc7445b68fa83 100644 (file)
@@ -28,9 +28,6 @@
    +----------------------------------------------------------------------+
  */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "reg.h"
 #include "html.h"
index b6e5ac26fc2e954d330f71cd0f9b6d9c7a7ba36b..cfcf15a06cc9b73151ab13ba7dc931fce4cfc39c 100644 (file)
@@ -27,9 +27,7 @@
    |          Zeev Suraski <zeev@zend.com>                                |
    +----------------------------------------------------------------------+
  */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 #include "php_ini.h"
 #include "php_globals.h"
index 57af8dbe879e605cced955a0c502bb8940af74b5..6cf79471f4ab8f70c4172d986dbc9660fcdbed12 100644 (file)
@@ -29,9 +29,7 @@
  */
 
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 #include "php3_filestat.h"
 #include "php_globals.h"
index 685e8d9cf9e7a17050092e6e7dbd1fab722ad6f9..af6820a869b3d8d919293db7072761abb0c31a6e 100644 (file)
@@ -33,9 +33,6 @@
 #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 e13fb821193d8c0ad1bc0d6a176017e250aca1e2..eb427941eb9c954707fc8b32a522f02424537334 100644 (file)
@@ -28,9 +28,6 @@
    +----------------------------------------------------------------------+
  */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "phpmath.h"
 #include "snprintf.h"
index 23e2d54c4bd5395461208b54a3d62fdaa4361496..959b7dea9a5ec9e3c6fdeb2b57ba88992bf26281 100644 (file)
@@ -30,9 +30,6 @@
 /* 
  * md5.c - Copyright 1997 Lachlan Roche 
  */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 
 #include <stdio.h>
 #include "php.h"
index 3ccf2a28a9e89e11ad359ac60aaaf6c2922426bb..81e0694a58239cffb2fb51eb03512bbe27125817 100644 (file)
@@ -36,9 +36,6 @@
 #include <string.h>
 #include <errno.h>
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 #include "microtime.h"
 #include "snprintf.h"
index fdc794a87c508e0bc3218212cbfd5b374e3b8a10..d6f71e57acee83b14b82a14e0c3aa20ff5e83016 100644 (file)
@@ -27,9 +27,7 @@
    +----------------------------------------------------------------------+
  */
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include <stdio.h>
 #include "php.h"
 #include "ext/standard/php3_standard.h"
index 83fa1284d587f45a7f01c69d66fe49616948df25..b6dfd1f5eb3f1323dd7b4d192d06a57b9d683c79 100644 (file)
@@ -27,9 +27,7 @@
    +----------------------------------------------------------------------+
  */
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 
 #include <stdio.h>
index 2c072c7b35dbe69da07e6221130a32b6e92ea780..18ef5df956c9a61e0633006e4dd3ae64ed25e52e 100644 (file)
@@ -27,9 +27,7 @@
    +----------------------------------------------------------------------+
  */
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 #include "pageinfo.h"
 
index 224450990db669361dc892cf7df6654b73427831..3520c0b3b1771cec75c9eafe8aa2a665e8d07dc2 100644 (file)
@@ -27,9 +27,7 @@
    +----------------------------------------------------------------------+
  */
 /* $Id: */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include <stdio.h>
 #include "php.h"
 #include "php3_standard.h"
index 8b81e82e7fe2fce7de99ae596aa529396eca618a..4f37bf133a9ce0a4951253f18437d509675a7ee1 100644 (file)
@@ -29,9 +29,7 @@
    +----------------------------------------------------------------------+
  */
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include <stdio.h>
 #include "php.h"
 #include "php3_string.h"
index b05605275c6e9ac6764ec3a0d7a92e546cc8f5d7..973081f02fd45f44d2741ede8d82e46356755a18 100644 (file)
@@ -31,9 +31,7 @@
 
 
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include <stdio.h>
 #include "php.h"
 #include "reg.h"
index 662aa08cfb61fde55c394a5946927ba2287452c3..e1cdae36e4e1eec004774459413a30c1584aa370 100644 (file)
@@ -28,9 +28,7 @@
  */
 
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 #include "php_ini.h"
 #include "zend_globals.h"
index 89988b3eca8238c1cd9ad7e55dacc4f41057d9db..548838fdf9b7e4f47a45284a496afd53f4407ae2 100644 (file)
@@ -28,9 +28,7 @@
  */
 
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 
 #include <stdlib.h>
index df6e6171f656d71dfec89cd0963bf8048c6e353a..4cd32961eaa26381a064c09b52cf13e6bdf68345 100644 (file)
@@ -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 "url.h"
index feb277c4c304466882878127a2c15861cab0008d..7bf00519f5e96f1454311f36a107e2ccca34ca52 100644 (file)
@@ -27,9 +27,6 @@
    +----------------------------------------------------------------------+
  */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
index 363bfed9b0e623e455526e434e5f010a79166688..46ff513c562e4e9ce5c4d93fbf75914104ce9980 100644 (file)
@@ -28,9 +28,6 @@
 #endif
 #define IS_EXT_MODULE
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 
 #include <stdio.h>
index 46d7551b27e2f8d44b6ab4daab19db6c60bf5af3..8069ea3d71698779a312adf5cffddf09cf5f166a 100644 (file)
--- a/fhttpd.c
+++ b/fhttpd.c
@@ -28,9 +28,6 @@
  */
 
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 
 #include <stdlib.h>
index 60edb6fae40144e6cf1191115b02461d2b7302d8..74823b2945e5fe4aa3dbdf5c955ab2ae9d2e92b9 100644 (file)
  */
 /* $Id$ */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
 #include "php.h"
 #include "php_globals.h"
 
index 65fab070b1af050092da3b07b318518e54f31403..5a0cf38eefe21100a3f89b94a2f0c8f6aebe426f 100644 (file)
@@ -36,9 +36,6 @@
 #undef SHUTDOWN_DEBUG
 #define SHUTDOWN_DEBUG(resource)
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include <stdio.h>
 #include "php.h"
 #ifdef MSVC5
index 1b96bdf7dd8a19fc76314bc98008a06c52912fd2..c4992893a93584581ffc5b4496951039b1fd07ad 100644 (file)
@@ -27,9 +27,7 @@
    +----------------------------------------------------------------------+
  */
 /* $Id$ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "php.h"
 
 #include <stdio.h>
index 4fb46433d58a3af5fadf8450fcecdd313c902b77..46febce3fb60b2ce34750527e1b9dfafc0bd9216 100644 (file)
  */
 /* $Id$ */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#include "php.h"
-#else
 #include "httpd.h"
 #include "http_config.h"
 #if MODULE_MAGIC_NUMBER > 19980712
@@ -48,7 +44,6 @@
 #include "http_protocol.h"
 #include "http_request.h"
 #include "http_log.h"
-#endif
 
 
 /* These are taken out of php_ini.h
index 44ef3f9a23f38e9ca45574d091f62d5e64d40be8..6132ef8c91422606f8b842f114c903cd77321824 100644 (file)
    +----------------------------------------------------------------------+
  */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
-
 #include "php.h"
 
 #if HAVE_UNISTD_H
index d760284a73b9d22753a16a5ce14dacd1fe1e928b..330599f1dabfdf52b0e3e155766e5d84b099e0cb 100644 (file)
@@ -27,9 +27,6 @@
    +----------------------------------------------------------------------+
  */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"
 
 #ifndef THREAD_SAFE
diff --git a/tls.c b/tls.c
deleted file mode 100644 (file)
index 9b61553..0000000
--- a/tls.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-   +----------------------------------------------------------------------+
-   | PHP HTML Embedded Scripting Language Version 3.0                     |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997,1998 PHP Development Team (See Credits file)      |
-   +----------------------------------------------------------------------+
-   | This program is free software; you can redistribute it and/or modify |
-   | it under the terms of one of the following licenses:                 |
-   |                                                                      |
-   |  A) the GNU General Public License as published by the Free Software |
-   |     Foundation; either version 2 of the License, or (at your option) |
-   |     any later version.                                               |
-   |                                                                      |
-   |  B) the PHP License as published by the PHP Development Team and     |
-   |     included in the distribution in the file: LICENSE                |
-   |                                                                      |
-   | This program is distributed in the hope that it will be useful,      |
-   | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
-   | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
-   | GNU General Public License for more details.                         |
-   |                                                                      |
-   | You should have received a copy of both licenses referred to here.   |
-   | If you did not, or have any questions about PHP licensing, please    |
-   | contact core@php.net.                                                |
-   +----------------------------------------------------------------------+
-   | Authors:                                                             |
-   |                                                                      |
-   +----------------------------------------------------------------------+
- */
-#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 */
-VOID ErrorExit (LPTSTR lpszMessage) 
-{ 
-   fprintf(stderr, "%s\n", lpszMessage); 
-   ExitProcess(0); 
-} 
-
-/*all these functions are called from DllMain()
-  in a NON thread safe version, tls_startup and
-  tls_shutdown should be initiated before anything
-  else.  This will allocate memory for globals.
-
-  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");
-       }
-} 
-
-*/
diff --git a/tls.h b/tls.h
deleted file mode 100644 (file)
index c401d14..0000000
--- a/tls.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
-   +----------------------------------------------------------------------+
-   | PHP HTML Embedded Scripting Language Version 3.0                     |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997,1998 PHP Development Team (See Credits file)      |
-   +----------------------------------------------------------------------+
-   | This program is free software; you can redistribute it and/or modify |
-   | it under the terms of one of the following licenses:                 |
-   |                                                                      |
-   |  A) the GNU General Public License as published by the Free Software |
-   |     Foundation; either version 2 of the License, or (at your option) |
-   |     any later version.                                               |
-   |                                                                      |
-   |  B) the PHP License as published by the PHP Development Team and     |
-   |     included in the distribution in the file: LICENSE                |
-   |                                                                      |
-   | This program is distributed in the hope that it will be useful,      |
-   | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
-   | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
-   | GNU General Public License for more details.                         |
-   |                                                                      |
-   | You should have received a copy of both licenses referred to here.   |
-   | If you did not, or have any questions about PHP licensing, please    |
-   | contact core@php.net.                                                |
-   +----------------------------------------------------------------------+
-   | Authors:                                                             |
-   |                                                                      |
-   +----------------------------------------------------------------------+
- */
-#ifndef _TLS_H_
-#define _TLS_H_
-#if WIN32|WINNT
-#include "win32/pwd.h"
-#include "win32/sendmail.h"
-#include <winsock.h>
-#endif
-
-#include "alloc.h"
-#include "ext/standard/head.h"
-#include "ext/bcmath/number.h"
-#include "constants.h"
-#include <sys/stat.h>
-#if USE_SAPI
-#include "serverapi/sapi.h"
-#endif
-
-typedef struct php3_global_struct{
-       /*all globals must be here*/
-       /*alloc.c*/
-       void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
-       unsigned char cache_count[MAX_CACHED_MEMORY];
-       int saved_umask;
-       mem_header *head;
-       unsigned int allocated_memory;
-
-       /*getopt.c*/
-       char *optarg;
-       int optind;
-       int opterr;
-       int optopt;
-       /*file.c*/
-       int pclose_ret;
-       int wsa_fp;
-       /*zend-parser.tab.c*/
-       HashTable function_table;
-       HashTable include_names;
-       int current_lineno;
-       int include_count;
-       FunctionState function_state;
-       FunctionState php3g_function_state_for_require;
-       char *class_name;
-       HashTable *class_symbol_table;
-       pval return_value,globals;
-       unsigned int param_index;
-       pval *array_ptr;
-       /*list.c*/
-       int module_count;
-       int current_module_being_cleaned;
-       /*main.c*/
-       int initialized;
-       int module_initialized;
-       char *php3_ini_path;
-       unsigned char header_is_being_sent;
-#if APACHE
-       request_rec *php3_rqst;
-#endif
-#if USE_SAPI
-       struct sapi_request_info *sapi_rqst;
-#endif
-#if WIN32|WINNT
-       unsigned int wintimer_counter;
-       unsigned int wintimer;
-       unsigned int timerstart;
-#endif
-       FILE *phpin;
-       /*request_info.c*/
-       php3_request_info request_info;
-       /*token_cache.c*/
-       pval phplval;
-       /*constants.c*/
-       HashTable php3_constants;
-
-       /*Functions*/
-       /*bc math*/
-       long bc_precision;
-       bc_num _zero_;
-       bc_num _one_;
-       bc_num _two_;
-       /*browscap.c*/
-       HashTable browser_hash;
-       char *lookup_browser_name;
-       pval *found_browser_entry;
-       /*dir.c*/
-       int dirp_id;
-       int le_dirp;
-       /*file.c*/
-       int fgetss_state;
-       int le_fp;
-       int le_pp;
-       /*filestat.c*/
-       char *CurrentStatFile;
-#if MSVC5
-       unsigned int CurrentStatLength;
-#else
-       int CurrentStatLength;
-#endif
-       struct stat sb;
-#if HAVE_SYMLINK
-       struct stat lsb;
-#endif
-       /*formated_print.c*/
-       char cvt_buf[80]; /*STATIC VAR*/
-       /*head.c*/
-       int php3_PrintHeader;
-       CookieList *top;
-       char *cont_type;
-       int header_called;
-       /*info.c*/
-#if APACHE
-       module *top_module;
-#endif
-       /*pageinfo.c*/
-       long page_uid;
-       long page_inode;
-       long page_mtime;
-       /*post.c*/
-       int le_uploads;
-       /*strings.h*/
-       char *strtok_string;
-       char *strtok_pos1; /*STATIC VAR*/
-       char *strtok_pos2; /*STATIC VAR*/
-#ifndef HAVE_STRERROR
-       char str_ebuf[40]; /*STATIC VAR*/
-#endif 
-#if WIN32|WINNT
-       /*pwd.c*/
-       struct passwd pw;       /* should we return a malloc()'d structure   */
-       /*sendmail.c*/
-       char Buffer[MAIL_BUFFER_SIZE]; 
-       SOCKET sc;
-       WSADATA Data;
-       struct hostent *adr;
-       SOCKADDR_IN sock_in;
-       int WinsockStarted;
-       char *AppName;
-       char MailHost[HOST_NAME_LEN];
-       char LocalHost[HOST_NAME_LEN];
-       /*winsyslog.c*/
-       char *loghdr;           /* log file header string */
-       HANDLE loghdl;  /* handle of event source */
-       /*time.c*/
-       unsigned int proftimer,virttimer,realtimer;
-       LPMSG phpmsg;
-       /*winutil*/
-       char Win_Error_msg[256];
-#endif
-       /*check for each module if it is compiled staticly
-       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
-
-/* Other needed defines */
-#if !defined(COMPILE_DL)
-extern int phplex(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);
-
-#endif
index e6d709d75036988deda556e08ff74d4674cad4aa..27194a78749e87e6884f1e87d2a2db6ec4bc4ddb 100644 (file)
@@ -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>
index b598a03b9c0b24f8890a23184a25cfde5f4912dc..2889676a90df6a9664af537f523a63c3788d4b18 100644 (file)
@@ -18,9 +18,6 @@
  *
  */
 
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
 #include "php.h"                               /*php specific */
 #include <stdio.h>
 #include <stdlib.h>
index 1a50f87547fc53af2ac5df0758d55a1bea336fae..c48315e3e403f40a1719c3162dd55aac5adef1d8 100644 (file)
@@ -13,9 +13,7 @@
 
 
 /* Include stuff ************************************************************ */
-#ifdef THREAD_SAFE
-#include "tls.h"
-#endif
+
 #include "time.h"
 #include "unistd.h"
 #include "signal.h"
index 0ac7e547034015de7b07a0dee801f2935d0ec74c..d22aa308dc4a7373db0143a093d789c4b7acf0bc 100644 (file)
@@ -1,9 +1,3 @@
-#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"
@@ -14,16 +8,14 @@ static char Win_Error_msg[256];
 
 char *php3_win_err(void)
 {
-       TLS_VARS;
-
        FormatMessage(
                                         FORMAT_MESSAGE_FROM_SYSTEM,
                                         NULL,
                                         GetLastError(),
                                         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),             // Default language
-                                         (LPTSTR) GLOBAL(Win_Error_msg),
+                                         (LPTSTR) Win_Error_msg,
                                         256,
                                         NULL);
 
-       return GLOBAL(Win_Error_msg);
+       return Win_Error_msg;
 }
index 4207370dbfbf78de962f8b298e02aa38170ca263..701eeed913d820283fb9ae63c3f32588aaf82093 100644 (file)
@@ -50,9 +50,6 @@
  *  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>