Fix W2k 'freeaddrinfo' error

Trying to run the pthread enabled binaries on W2k resulted in an error
dialog with the text, "The procedure entry point freeaddrinfo could not be
located in ws2_32.dll".  A Microsoft support page
(http://support.microsoft.com/kb/955045) hints that when 'ws2tcpip.h' is
included that 'wspiapi.h' should be included as well.  Since MinGw
includes both files, this patch corrects the runtime error on W2k
Hamlib-3.0
Nate Bargmann 2013-05-18 07:31:40 -05:00
rodzic 2d6361397b
commit b9ff04abf0
5 zmienionych plików z 14 dodań i 1 usunięć

Wyświetl plik

@ -116,8 +116,9 @@ dnl set host_os variable
AC_CANONICAL_HOST
dnl ws2tcpip.h not provided by cygwin and its test causes a configure warning.
dnl wspiapi.h provides needed freeaddrinfo function on W2k systems.
AS_IF([test "${host_os}" != "cygwin"], [
AC_CHECK_HEADERS([ws2tcpip.h])
AC_CHECK_HEADERS([ws2tcpip.h wspiapi.h])
])

Wyświetl plik

@ -48,6 +48,9 @@
#include <sys/socket.h>
#elif HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
# if defined(HAVE_WSPIAPI_H)
# include <wspiapi.h>
# endif
#endif
/*

Wyświetl plik

@ -59,6 +59,9 @@
#include <sys/socket.h>
#elif HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
# if defined(HAVE_WSPIAPI_H)
# include <wspiapi.h>
# endif
#endif
#include "hamlib/rig.h"

Wyświetl plik

@ -49,6 +49,9 @@
#elif HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#include <fcntl.h>
# if defined(HAVE_WSPIAPI_H)
# include <wspiapi.h>
# endif
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>

Wyświetl plik

@ -48,6 +48,9 @@
#elif HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#include <fcntl.h>
# if defined(HAVE_WSPIAPI_H)
# include <wspiapi.h>
# endif
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>