From: Zeev Suraski Date: Sat, 13 Jan 2001 13:02:19 +0000 (+0000) Subject: Fix Windows & thread-safe build X-Git-Tag: php-4.0.5RC1~603 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6562e98afabf7469d509b59c6215fc4aeb129ed6;p=php Fix Windows & thread-safe build --- diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index f4eabe845e..1d540408a9 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -270,9 +270,9 @@ FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, free_url(resource); if (location[0] != '\0') { zval **response_header_new, *entry, **entryp; + ELS_FETCH(); fp = php_fopen_url_wrap_http(location, mode, options, issock, socketd, opened_path); - ELS_FETCH(); if (zend_hash_find(EG(active_symbol_table), "http_response_header", sizeof("http_response_header"), (void **) &response_header_new) == SUCCESS) { entryp = &entry; MAKE_STD_ZVAL(entry); diff --git a/main/network.c b/main/network.c index 8a73fff0c3..7b6bfda022 100644 --- a/main/network.c +++ b/main/network.c @@ -59,11 +59,13 @@ int inet_aton(const char *, struct in_addr *); # define SOCK_CONN_ERR -1 #endif +#ifdef HAVE_GETADDRINFO #ifdef HAVE_GAI_STRERROR # define PHP_GAI_STRERROR(x) (gai_strerror(x)) #else # define PHP_GAI_STRERROR(x) (php_gai_strerror(x)) -static char *php_gai_strerror(int code) { +static char *php_gai_strerror(int code) +{ static struct { int code; const char *msg; @@ -96,6 +98,7 @@ static char *php_gai_strerror(int code) { return "Unknown error"; } #endif +#endif static void php_network_freeaddresses(struct sockaddr **sal) {