Skip to content

Commit b960ae6

Browse files
committed
Clean up remaining gethostbyname(_r) detritus
Includes some global state as well.
1 parent 5957f97 commit b960ae6

4 files changed

Lines changed: 1 addition & 13 deletions

File tree

configure.ac

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,6 @@ dnl Check for functions inside their belonging headers.
625625
AC_CHECK_HEADER([sys/prctl.h], [AC_CHECK_FUNCS([prctl])])
626626
AC_CHECK_HEADER([sys/procctl.h], [AC_CHECK_FUNCS([procctl])])
627627

628-
AX_FUNC_WHICH_GETHOSTBYNAME_R
629-
630628
dnl Some systems (Solaris 10) do not have nanosleep in libc.
631629
AC_CHECK_FUNCS([nanosleep],,
632630
[AC_SEARCH_LIBS([nanosleep], [rt], [AC_DEFINE([HAVE_NANOSLEEP], [1])])])

ext/standard/file.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ static void file_globals_ctor(php_file_globals *file_globals_p)
133133

134134
static void file_globals_dtor(php_file_globals *file_globals_p)
135135
{
136-
#if defined(HAVE_GETHOSTBYNAME_R)
137-
if (file_globals_p->tmp_host_buf) {
138-
free(file_globals_p->tmp_host_buf);
139-
}
140-
#endif
141136
}
142137

143138
static PHP_INI_MH(OnUpdateAutoDetectLineEndings)

ext/standard/file.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ typedef struct {
102102
HashTable *stream_filters; /* per-request copy of stream_filters_hash */
103103
HashTable *wrapper_errors; /* key: wrapper address; value: linked list of char* */
104104
int pclose_wait;
105-
#ifdef HAVE_GETHOSTBYNAME_R
106-
struct hostent tmp_host_info;
107-
char *tmp_host_buf;
108-
size_t tmp_host_buf_len;
109-
#endif
110105
} php_file_globals;
111106

112107
#ifdef ZTS

main/php_network.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ END_EXTERN_C()
8181
#include <sys/socket.h>
8282
#endif
8383

84-
#ifdef HAVE_GETHOSTBYNAME_R
84+
#ifndef PHP_WIN32
8585
#include <netdb.h>
8686
#endif
8787

0 commit comments

Comments
 (0)