Fix ZTS build.

This commit is contained in:
Sebastian Bergmann 2002-08-25 22:17:56 +00:00
parent ddddf398af
commit e8b50bc834
5 changed files with 9 additions and 9 deletions

View File

@ -102,7 +102,7 @@ union ipbox {
/* {{{ ftp_open /* {{{ ftp_open
*/ */
ftpbuf_t* 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; ftpbuf_t *ftp;
int size; int size;
@ -119,7 +119,7 @@ ftp_open(const char *host, short port, long timeout_sec)
tv.tv_sec = timeout_sec; tv.tv_sec = timeout_sec;
tv.tv_usec = 0; 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) { if (ftp->fd == -1) {
goto bail; goto bail;
} }

View File

@ -81,7 +81,7 @@ typedef struct ftpbuf
/* open a FTP connection, returns ftpbuf (NULL on error) /* open a FTP connection, returns ftpbuf (NULL on error)
* port is the ftp port in network byte order, or 0 for the default * 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) /* quits from the ftp session (it still needs to be closed)
* return true on success, false on error * return true on success, false on error

View File

@ -145,7 +145,7 @@ PHP_FUNCTION(ftp_connect)
} }
/* connect */ /* connect */
ftp = ftp_open(host, (short)port, timeout_sec); ftp = ftp_open(host, (short)port, timeout_sec TSRMLS_CC);
if (ftp == NULL) { if (ftp == NULL) {
RETURN_FALSE; RETURN_FALSE;
} }

View File

@ -144,7 +144,7 @@ static void php_network_freeaddresses(struct sockaddr **sal)
/* {{{ php_network_getaddresses /* {{{ php_network_getaddresses
* Returns number of addresses, 0 for none/error * 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; struct sockaddr **sap;
int n; int n;
@ -372,7 +372,7 @@ PHPAPI int php_connect_nonb_win32(SOCKET sockfd,
* port, returns the created socket on success, else returns -1. * port, returns the created socket on success, else returns -1.
* timeout gives timeout in seconds, 0 means blocking mode. * 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; int n, repeatto, s;
struct sockaddr **sal, **psal; struct sockaddr **sal, **psal;
@ -382,7 +382,7 @@ int php_hostconnect(const char *host, unsigned short port, int socktype, struct
int err; int err;
#endif #endif
n = php_network_getaddresses(host, &sal); n = php_network_getaddresses(host, &sal TSRMLS_CC);
if (n == 0) if (n == 0)
return -1; return -1;
@ -537,7 +537,7 @@ PHPAPI php_stream *_php_stream_sock_open_host(const char *host, unsigned short p
{ {
int socket; int socket;
socket = php_hostconnect(host, port, socktype, timeout); socket = php_hostconnect(host, port, socktype, timeout TSRMLS_CC);
if (socket == -1) if (socket == -1)
return NULL; return NULL;

View File

@ -91,7 +91,7 @@ typedef struct {
#endif #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); PHPAPI int php_connect_nonb(int sockfd, const struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout);
#ifdef PHP_WIN32 #ifdef PHP_WIN32