Added some consts for arguments in network.c declarations. Moved

php_sockaddr_storage to php_network.h and added check for struct
sockaddr_storage
This commit is contained in:
Stig Venaas 2002-01-06 11:54:19 +00:00
parent 350777932a
commit 6e1878b0fc
5 changed files with 22 additions and 9 deletions

View file

@ -41,10 +41,18 @@
#include <sys/time.h>
#endif
#ifdef HAVE_SOCKADDR_STORAGE
typedef struct sockaddr_storage php_sockaddr_storage;
#else
typedef struct {
unsigned short ss_family;
char info[256];
} php_sockaddr_storage;
#endif
int php_hostconnect(char *host, unsigned short port, int socktype, int timeout);
PHPAPI int php_connect_nonb(int sockfd, struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout);
int php_hostconnect(const char *host, unsigned short port, int socktype, int timeout);
PHPAPI int php_connect_nonb(int sockfd, const struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout);
#endif /* _PHP_NETWORK_H */