mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Fix ZTS build.
This commit is contained in:
parent
ddddf398af
commit
e8b50bc834
@ -102,7 +102,7 @@ union ipbox {
|
||||
/* {{{ ftp_open
|
||||
*/
|
||||
ftpbuf_t*
|
||||
ftp_open(const char *host, short port, long timeout_sec)
|
||||
ftp_open(const char *host, short port, long timeout_sec TSRMLS_DC)
|
||||
{
|
||||
ftpbuf_t *ftp;
|
||||
int size;
|
||||
@ -119,7 +119,7 @@ ftp_open(const char *host, short port, long timeout_sec)
|
||||
tv.tv_sec = timeout_sec;
|
||||
tv.tv_usec = 0;
|
||||
|
||||
ftp->fd = php_hostconnect(host, (unsigned short) (port ? port : 21), SOCK_STREAM, &tv);
|
||||
ftp->fd = php_hostconnect(host, (unsigned short) (port ? port : 21), SOCK_STREAM, &tv TSRMLS_CC);
|
||||
if (ftp->fd == -1) {
|
||||
goto bail;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ typedef struct ftpbuf
|
||||
/* open a FTP connection, returns ftpbuf (NULL on error)
|
||||
* port is the ftp port in network byte order, or 0 for the default
|
||||
*/
|
||||
ftpbuf_t* ftp_open(const char *host, short port, long timeout_sec);
|
||||
ftpbuf_t* ftp_open(const char *host, short port, long timeout_sec TSRMLS_DC);
|
||||
|
||||
/* quits from the ftp session (it still needs to be closed)
|
||||
* return true on success, false on error
|
||||
|
@ -145,7 +145,7 @@ PHP_FUNCTION(ftp_connect)
|
||||
}
|
||||
|
||||
/* connect */
|
||||
ftp = ftp_open(host, (short)port, timeout_sec);
|
||||
ftp = ftp_open(host, (short)port, timeout_sec TSRMLS_CC);
|
||||
if (ftp == NULL) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ static void php_network_freeaddresses(struct sockaddr **sal)
|
||||
/* {{{ php_network_getaddresses
|
||||
* Returns number of addresses, 0 for none/error
|
||||
*/
|
||||
static int php_network_getaddresses(const char *host, struct sockaddr ***sal)
|
||||
static int php_network_getaddresses(const char *host, struct sockaddr ***sal TSRMLS_DC)
|
||||
{
|
||||
struct sockaddr **sap;
|
||||
int n;
|
||||
@ -372,7 +372,7 @@ PHPAPI int php_connect_nonb_win32(SOCKET sockfd,
|
||||
* port, returns the created socket on success, else returns -1.
|
||||
* timeout gives timeout in seconds, 0 means blocking mode.
|
||||
*/
|
||||
int php_hostconnect(const char *host, unsigned short port, int socktype, struct timeval *timeout)
|
||||
int php_hostconnect(const char *host, unsigned short port, int socktype, struct timeval *timeout TSRMLS_DC)
|
||||
{
|
||||
int n, repeatto, s;
|
||||
struct sockaddr **sal, **psal;
|
||||
@ -382,7 +382,7 @@ int php_hostconnect(const char *host, unsigned short port, int socktype, struct
|
||||
int err;
|
||||
#endif
|
||||
|
||||
n = php_network_getaddresses(host, &sal);
|
||||
n = php_network_getaddresses(host, &sal TSRMLS_CC);
|
||||
|
||||
if (n == 0)
|
||||
return -1;
|
||||
@ -537,7 +537,7 @@ PHPAPI php_stream *_php_stream_sock_open_host(const char *host, unsigned short p
|
||||
{
|
||||
int socket;
|
||||
|
||||
socket = php_hostconnect(host, port, socktype, timeout);
|
||||
socket = php_hostconnect(host, port, socktype, timeout TSRMLS_CC);
|
||||
|
||||
if (socket == -1)
|
||||
return NULL;
|
||||
|
@ -91,7 +91,7 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
|
||||
int php_hostconnect(const char *host, unsigned short port, int socktype, struct timeval *timeout);
|
||||
int php_hostconnect(const char *host, unsigned short port, int socktype, struct timeval *timeout TSRMLS_DC);
|
||||
PHPAPI int php_connect_nonb(int sockfd, const struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout);
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user