summaryrefslogtreecommitdiff
path: root/nt/mingw-cfg.site
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2016-03-05 12:12:58 +0200
committerEli Zaretskii <eliz@gnu.org>2016-03-05 12:12:58 +0200
commitbc96f6e827ba079006ae87914395942fc79f3f26 (patch)
treec980a478b0229057db165de1fec6a40fc56b1f0b /nt/mingw-cfg.site
parentac9a931d595dd83ebac61c6c9cf7388985fee277 (diff)
downloademacs-bc96f6e827ba079006ae87914395942fc79f3f26.tar.gz
Implement getaddrinfo fallback for MS-Windows
See http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg01602.html for more details. * nt/mingw-cfg.site (ac_cv_func_getaddrinfo) (ac_cv_func_gai_strerror): Set to "yes", as the configure script's test program is not smart enough to auto-detect these. * nt/inc/sys/socket.h (getaddrinfo, freeaddrinfo): Redirect to sys_getaddrinfo and sys_freeaddrinfo. Provide prototypes for sys_getaddrinfo and sys_freeaddrinfo. * src/w32.c (init_winsock): Try loading getaddrinfo and freeaddrinfo from ws2_32.dll. (sys_getaddrinfo, sys_freeaddrinfo): New functions. * lib-src/pop.c [WINDOWSNT]: Include winsock2.h, not winsock.h, and also ws2tcpip.h. (getaddrinfo, freeaddrinfo) [WINDOWSNT]: Redirect to sys_getaddrinfo and sys_freeaddrinfo, respectively. (load_ws2, sys_getaddrinfo, sys_freeaddrinfo) [WINDOWSNT]: New functions.
Diffstat (limited to 'nt/mingw-cfg.site')
-rw-r--r--nt/mingw-cfg.site4
1 files changed, 4 insertions, 0 deletions
diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site
index 05034fedd48..ff9df60c275 100644
--- a/nt/mingw-cfg.site
+++ b/nt/mingw-cfg.site
@@ -68,6 +68,10 @@ ac_cv_func_getsockname=yes
ac_cv_func_getpeername=yes
# Implemented as sys_socket in w32.c
ac_cv_func_socket=yes
+# Implemented as sys_getaddrinfo in w32.c
+ac_cv_func_getaddrinfo=yes
+# Implemented as an inline function in ws2tcpip.h
+ac_cv_func_gai_strerror=yes
# Implemented in w32.c
ac_cv_func_mkostemp=yes
ac_cv_func_readlink=yes