1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00

Both thread-safe and thread-unsafe builds should be ok now

This commit is contained in:
Zeev Suraski
2001-01-13 23:49:44 +00:00
parent 94ca2181fb
commit a85da45a66
5 changed files with 19 additions and 20 deletions
+1 -2
View File
@@ -710,7 +710,6 @@ PHP_MINIT_FUNCTION(basic)
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 @@ PHP_MSHUTDOWN_FUNCTION(basic)
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;
}
+16 -2
View File
@@ -149,7 +149,6 @@ PHPAPI int php_file_le_socket(void) /* XXX doe we really want this???? */
}
#ifdef ZTS
static void file_globals_ctor(FLS_D)
{
zend_hash_init(&FG(ht_fsock_keys), 0, NULL, NULL, 1);
@@ -159,13 +158,15 @@ static void file_globals_ctor(FLS_D)
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)
{
@@ -191,6 +192,19 @@ PHP_MINIT_FUNCTION(file)
}
/* }}} */
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 */
+2 -1
View File
@@ -23,7 +23,8 @@
#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);
-13
View File
@@ -715,19 +715,6 @@ void php_msock_destroy(int *data)
/* }}} */
PHP_MINIT_FUNCTION(fsock)
{
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(fsock)
{
#ifndef ZTS
fsock_globals_dtor(FLS_C);
#endif
return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(fsock)
{
FLS_FETCH();
-2
View File
@@ -87,8 +87,6 @@ void php_cleanup_sockbuf(int persistent FLS_DC);
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 */