Skip to content

Commit fd8a332

Browse files
author
wilx
committed
Merge revisions 1102-1105 from PRODUCTION_1_0_x branch.
r1105: socket-unix.cxx: Always set ai_flags to AI_CANONNAME. Add AI_NUMERICHOST if the hostname looks like an IP address. r1104: socket-unix.cxx: Fix get_host_by_name(). r1103: socket-unix.cxx: Implement new function get_host_by_name() as a wrapper around either getaddrinfo() or around gethostbyname() protected by mutex. This is to fix crashes on Linux and other systems where gethostbyname() is not thread safe because it uses static storage for its result. Use the new function instead of gethostbyname(). r1102: ax_gethostbyname_r.m4 (AX_GETHOSTBYNAME_R): New test for Linux style gethostbyname_r(). ax_getaddrinfo.m4 (AX_GETADDRINFO): New test for getaddrinfo(). configure.in: Use AX_GETHOSTBYNAME_R and AX_GETADDRINFO. Make test for ENAMETOOLONG visible in the configure output. *: Regenerate.
1 parent 2369b3f commit fd8a332

File tree

28 files changed

+840
-39
lines changed

28 files changed

+840
-39
lines changed

Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
5454
$(top_srcdir)/m4/ax__sync.m4 \
5555
$(top_srcdir)/m4/ax_macro_va_args.m4 \
5656
$(top_srcdir)/m4/ax_macro_function.m4 \
57-
$(top_srcdir)/configure.in
57+
$(top_srcdir)/m4/ax_gethostbyname_r.m4 \
58+
$(top_srcdir)/m4/ax_getaddrinfo.m4 $(top_srcdir)/configure.in
5859
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
5960
$(ACLOCAL_M4)
6061
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \

acinclude.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ m4_include([m4/ax_declspec.m4])
88
m4_include([m4/ax_tls_support.m4])
99
m4_include([m4/ax__sync.m4])
1010
m4_include([m4/ax_macro_va_args.m4])
11-
m4_include([m4/ax_macro_function.m4])
11+
m4_include([m4/ax_macro_function.m4])
12+
m4_include([m4/ax_gethostbyname_r.m4])
13+
m4_include([m4/ax_getaddrinfo.m4])

0 commit comments

Comments
 (0)