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:
@@ -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
@@ -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
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user