ObjFW  Diff

Differences From Artifact [a880605d64]:

To Artifact [f223d1d76e]:


84
85
86
87
88
89
90


















91

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
			], [
			AC_MSG_ERROR(No pthreads or other supported threads!)])
		;;
esac

AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32")



















AC_MSG_CHECKING(whether we have IPv6 support)

AC_CACHE_VAL(ac_cv_have_ipv6, [
	AC_TRY_RUN([
		#ifndef _WIN32
		#include <sys/types.h>
		#include <sys/socket.h>
		#include <netinet/in.h>
		#else
		#include <winsock2.h>
		#include <ws2tcpip.h>
		#endif

		#ifndef INVALID_SOCKET
		#define INVALID_SOCKET -1
		#endif

		int
		main()
		{
			int fd;
			struct sockaddr_in6 addr;

			fd = socket(AF_INET6, SOCK_STREAM, 0);

			exit(fd != INVALID_SOCKET ? 0 : 1);
		}],
		ac_cv_have_ipv6="yes",
		ac_cv_have_ipv6="no",
		ac_cv_have_ipv6="no")])
AC_MSG_RESULT($ac_cv_have_ipv6)
test x"$ac_cv_have_ipv6" = x"yes" && \
	AC_DEFINE(HAVE_IPV6, 1, "Whether we have IPv6 support")

AC_CHECK_FUNC(madvise, [AC_DEFINE(HAVE_MADVISE, 1, [Whether we have madvise])])

AC_LANG([Objective C])







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
|
|
|
|
|
|
|
|
|
|

|
|
|

|
|
|
|
|

|

|
|
|
|
|







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
			], [
			AC_MSG_ERROR(No pthreads or other supported threads!)])
		;;
esac

AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32")

AC_MSG_CHECKING(for getaddrinfo)
AC_TRY_COMPILE([
	#include <stddef.h>
	#ifndef _WIN32
	#include <sys/types.h>
	#include <sys/socket.h>
	#include <netdb.h>
	#else
	#define _WIN32_WINNT 0x0501
	#include <ws2tcpip.h>
	#endif], [
	struct addrinfo ai;
	getaddrinfo(NULL, NULL, NULL, NULL);
	], [have_getaddrinfo="yes"], [have_getaddrinfo="no"])
AC_MSG_RESULT($have_getaddrinfo)
test x"$have_getaddrinfo" = x"yes" && \
	AC_DEFINE(HAVE_GETADDRINFO, 1, [Whether we have getaddrinfo])

AC_MSG_CHECKING(whether we have IPv6 support)
AS_IF([test x"$have_getaddrinfo" = x"yes"], [
	AC_CACHE_VAL(ac_cv_have_ipv6, [
		AC_TRY_RUN([
			#ifndef _WIN32
			#include <sys/types.h>
			#include <sys/socket.h>
			#include <netinet/in.h>
			#else
			#include <winsock2.h>
			#include <ws2tcpip.h>
			#endif

			#ifndef INVALID_SOCKET
			#define INVALID_SOCKET -1
			#endif

			int
			main()
			{
				int fd;
				struct sockaddr_in6 addr;

				fd = socket(AF_INET6, SOCK_STREAM, 0);

				exit(fd != INVALID_SOCKET ? 0 : 1);
			}],
			ac_cv_have_ipv6="yes",
			ac_cv_have_ipv6="no",
			ac_cv_have_ipv6="no")])], [ac_cv_have_ipv6="no"])
AC_MSG_RESULT($ac_cv_have_ipv6)
test x"$ac_cv_have_ipv6" = x"yes" && \
	AC_DEFINE(HAVE_IPV6, 1, "Whether we have IPv6 support")

AC_CHECK_FUNC(madvise, [AC_DEFINE(HAVE_MADVISE, 1, [Whether we have madvise])])

AC_LANG([Objective C])