]> git.eshelyaron.com Git - emacs.git/commit
Implement getaddrinfo fallback for MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Sat, 5 Mar 2016 10:12:58 +0000 (12:12 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 5 Mar 2016 10:12:58 +0000 (12:12 +0200)
commitbc96f6e827ba079006ae87914395942fc79f3f26
treec980a478b0229057db165de1fec6a40fc56b1f0b
parentac9a931d595dd83ebac61c6c9cf7388985fee277
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.
lib-src/pop.c
nt/inc/sys/socket.h
nt/mingw-cfg.site
src/w32.c