zeev            Sat Jan 13 15:49:45 2001 EDT

  Modified files:              
    /php4/ext/standard  basic_functions.c file.c file.h fsock.c fsock.h 
  Log:
  Both thread-safe and thread-unsafe builds should be ok now
  
  
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.295 
php4/ext/standard/basic_functions.c:1.296
--- php4/ext/standard/basic_functions.c:1.295   Tue Jan  9 07:11:23 2001
+++ php4/ext/standard/basic_functions.c Sat Jan 13 15:49:44 2001
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.295 2001/01/09 15:11:23 hirokawa Exp $ */
+/* $Id: basic_functions.c,v 1.296 2001/01/13 23:49:44 zeev Exp $ */
 
 #include "php.h"
 #include "php_main.h"
@@ -710,7 +710,6 @@
 
        PHP_MINIT(regex)(INIT_FUNC_ARGS_PASSTHRU);
        PHP_MINIT(file)(INIT_FUNC_ARGS_PASSTHRU);
-       PHP_MINIT(fsock)(INIT_FUNC_ARGS_PASSTHRU);
        PHP_MINIT(pack)(INIT_FUNC_ARGS_PASSTHRU);
        PHP_MINIT(browscap)(INIT_FUNC_ARGS_PASSTHRU);
        PHP_MINIT(lcg)(INIT_FUNC_ARGS_PASSTHRU);
@@ -763,13 +762,13 @@
        UNREGISTER_INI_ENTRIES();
 
        PHP_MSHUTDOWN(regex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
-       PHP_MSHUTDOWN(fsock)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
        PHP_MSHUTDOWN(browscap)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
        PHP_MSHUTDOWN(array)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
        PHP_MSHUTDOWN(assert)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 #ifdef TRANS_SID
        PHP_MSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 #endif
+       PHP_MSHUTDOWN(file)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 
        return SUCCESS;
 }
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.133 php4/ext/standard/file.c:1.134
--- php4/ext/standard/file.c:1.133      Sat Jan 13 05:59:22 2001
+++ php4/ext/standard/file.c    Sat Jan 13 15:49:44 2001
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: file.c,v 1.133 2001/01/13 13:59:22 zeev Exp $ */
+/* $Id: file.c,v 1.134 2001/01/13 23:49:44 zeev Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -149,7 +149,6 @@
 }
 
 
-#ifdef ZTS
 static void file_globals_ctor(FLS_D)
 {
        zend_hash_init(&FG(ht_fsock_keys), 0, NULL, NULL, 1);
@@ -159,14 +158,16 @@
        FG(fgetss_state) = 0;
        FG(pclose_ret) = 0;
 }
+
+
 static void file_globals_dtor(FLS_D)
 {
        zend_hash_destroy(&FG(ht_fsock_socks));
        zend_hash_destroy(&FG(ht_fsock_keys));
        php_cleanup_sockbuf(1 FLS_CC);
 }
-#endif
 
+
 PHP_MINIT_FUNCTION(file)
 {
        le_fopen = zend_register_list_destructors_ex(_file_fopen_dtor, NULL, "file", 
module_number);
@@ -191,6 +192,19 @@
 }
 
 /* }}} */
+
+PHP_MSHUTDOWN_FUNCTION(file)
+{
+#ifndef ZTS
+       FLS_FETCH();
+
+       file_globals_dtor(FLS_C);
+#endif
+       return SUCCESS;
+}
+
+
+
 /* {{{ proto bool flock(int fp, int operation [, int wouldblock])
    Portable file locking */
 
Index: php4/ext/standard/file.h
diff -u php4/ext/standard/file.h:1.31 php4/ext/standard/file.h:1.32
--- php4/ext/standard/file.h:1.31       Sat Jan 13 05:59:22 2001
+++ php4/ext/standard/file.h    Sat Jan 13 15:49:44 2001
@@ -16,14 +16,15 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: file.h,v 1.31 2001/01/13 13:59:22 zeev Exp $ */
+/* $Id: file.h,v 1.32 2001/01/13 23:49:44 zeev Exp $ */
 
 /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */
 
 #ifndef FILE_H
 #define FILE_H
 
-extern PHP_MINIT_FUNCTION(file);
+PHP_MINIT_FUNCTION(file);
+PHP_MSHUTDOWN_FUNCTION(file);
 
 PHP_FUNCTION(tempnam);
 PHP_NAMED_FUNCTION(php_if_tmpfile);
Index: php4/ext/standard/fsock.c
diff -u php4/ext/standard/fsock.c:1.59 php4/ext/standard/fsock.c:1.60
--- php4/ext/standard/fsock.c:1.59      Sat Jan 13 14:00:23 2001
+++ php4/ext/standard/fsock.c   Sat Jan 13 15:49:44 2001
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: fsock.c,v 1.59 2001/01/13 22:00:23 derick Exp $ */
+/* $Id: fsock.c,v 1.60 2001/01/13 23:49:44 zeev Exp $ */
 
 /* Synced with php 3.0 revision 1.121 1999-06-18 [ssb] */
 /* Synced with php 3.0 revision 1.133 1999-07-21 [sas] */
@@ -714,19 +714,6 @@
 }
 /* }}} */
 
-
-PHP_MINIT_FUNCTION(fsock)
-{
-       return SUCCESS;
-}
-
-PHP_MSHUTDOWN_FUNCTION(fsock)
-{
-#ifndef ZTS
-       fsock_globals_dtor(FLS_C);
-#endif
-       return SUCCESS;
-}
 
 PHP_RSHUTDOWN_FUNCTION(fsock)
 {
Index: php4/ext/standard/fsock.h
diff -u php4/ext/standard/fsock.h:1.30 php4/ext/standard/fsock.h:1.31
--- php4/ext/standard/fsock.h:1.30      Sat Jan 13 05:59:22 2001
+++ php4/ext/standard/fsock.h   Sat Jan 13 15:49:44 2001
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: fsock.h,v 1.30 2001/01/13 13:59:22 zeev Exp $ */
+/* $Id: fsock.h,v 1.31 2001/01/13 23:49:44 zeev Exp $ */
 
 /* Synced with php 3.0 revision 1.24 1999-06-18 [ssb] */
 
@@ -87,8 +87,6 @@
 PHPAPI int connect_nonb(int sockfd, struct sockaddr *addr, socklen_t addrlen, struct 
timeval *timeout);
 PHPAPI struct php_sockbuf *php_get_socket(int socket);
 
-PHP_MINIT_FUNCTION(fsock);
-PHP_MSHUTDOWN_FUNCTION(fsock);
 PHP_RSHUTDOWN_FUNCTION(fsock);
 
 #endif /* FSOCK_H */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to