#endif
#if HAVE_WINSOCK2_H
#include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
#endif
int main(int argc, char **argv) {
FILE *fp = fopen("conftestval", "w");
#endif
#if HAVE_WINSOCK2_H
#include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
#endif
int main(int argc, char **argv)
{
#endif
#if HAVE_WINSOCK2_H
#include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
#endif
int main(int argc, char **argv)
{
#endif
#if HAVE_WINSOCK2_H
#include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
#endif
int main(int argc, char **argv)
{
#endif
#if HAVE_WINSOCK2_H
#include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
#endif
int main(int argc, char **argv)
{
])
-dnl checks the winsock library to use (ws2_32 or wsock32)
+dnl checks whether to use the ws2_32 library
dnl may set ac_cv_func_select as a side effect
AC_DEFUN([SQUID_CHECK_WINSOCK_LIB],[
- AC_CHECK_HEADERS(winsock2.h winsock.h)
+ AC_CHECK_HEADERS(winsock2.h)
SQUID_STATE_SAVE(winsock)
- SQUID_SEARCH_LIBS([squid_getprotobynumber],[ws2_32 wsock32],,,,[
+ SQUID_SEARCH_LIBS([squid_getprotobynumber],[ws2_32],,,,[
#if HAVE_WINSOCK2_H
#include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
#endif
/* ugly hack. */
void squid_getprotobynumber(void) {
AC_MSG_RESULT([winsock2])
XTRA_LIBS="-lws2_32 $XTRA_LIBS"
ac_cv_func_select="yes"
- ],
- ["-lwsock32"],[
- AC_MSG_RESULT([winsock])
- XTRA_LIBS="-lwsock32 $XTRA_LIBS"
- ac_cv_func_select="yes"
]
)
SQUID_STATE_ROLLBACK(winsock)
#include <errno.h>
#if HAVE_WINSOCK2_H
#include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
#endif
#if !_SQUID_CYGWIN_
/*
* Each of these functions is defined in the Squid namespace so as not to
- * clash with the winsock.h and winsock2.h definitions.
+ * clash with the winsock2.h definitions.
* It is then paired with a #define to cause these wrappers to be used by
* the main code instead of those system definitions.
*