ObjFW  Check-in [19ecfaf384]

Overview
Comment:Fix OFKernelEventObserver on Wii
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 19ecfaf384419244e366a70d6a1a0caebffc88caf794efcda0f97bdec02ce3be
User & Date: js on 2017-07-30 17:25:43
Other Links: manifest | tags
Context
2017-07-30
21:40
tests: Drain between OFKernelObserver tests check-in: 5e0bfb59b4 user: js tags: trunk
17:25
Fix OFKernelEventObserver on Wii check-in: 19ecfaf384 user: js tags: trunk
2017-07-29
20:29
OFStream: Only ignore SIGPIPE if it is defined check-in: 497656da0f user: js tags: trunk
Changes

Modified configure.ac from [4e7723bbdd] to [3b7fca8193].

1038
1039
1040
1041
1042
1043
1044

1045
1046
1047
1048
1049
1050
1051
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052







+







		AC_DEFINE(HAVE_EPOLL, 1, [Whether we have epoll])
		AC_SUBST(OFKERNELEVENTOBSERVER_EPOLL_M,
			"OFKernelEventObserver_epoll.m")
		break
	])

	AS_IF([test x"$with_wii" = x"yes"], [
		AC_DEFINE(HAVE_POLL, 1, [Whether we have poll()])
		AC_SUBST(OFKERNELEVENTOBSERVER_POLL_M,
			"OFKernelEventObserver_poll.m")
	], [
		AC_CHECK_HEADERS(poll.h)
		AC_CHECK_FUNC(poll, [
			AC_DEFINE(HAVE_POLL, 1, [Whether we have poll()])
			AC_SUBST(OFKERNELEVENTOBSERVER_POLL_M,
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1068
1069
1070
1071
1072
1073
1074






1075
1076
1077
1078
1079
1080
1081







-
-
-
-
-
-







					[Whether we have select() or similar])
				AC_SUBST(OFKERNELEVENTOBSERVER_SELECT_M,
					"OFKernelEventObserver_select.m")
			])
			;;
	esac

	AS_IF([test x"$with_wii" = x"yes"], [
		AC_DEFINE(HAVE_SELECT, 1, [Whether we have select() or similar])
		AC_SUBST(OFKERNELEVENTOBSERVER_SELECT_M,
			"OFKernelEventObserver_select.m")
	])

	AC_MSG_CHECKING(for getaddrinfo)
	AC_TRY_COMPILE([
		#include <stddef.h>
		#ifdef OF_HAVE_SYS_TYPES_H
		# include <sys/types.h>
		#endif
		#ifdef HAVE_SYS_SOCKET_H

Modified tests/OFKernelEventObserverTests.m from [f2b6e225cb] to [6685f5b362].

18
19
20
21
22
23
24
25
26
27

28
29

30
31
32
33



34
35


36
37
38
39
40
41
42
18
19
20
21
22
23
24



25


26
27
28
29
30
31
32
33


34
35
36
37
38
39
40
41
42







-
-
-
+
-
-
+




+
+
+
-
-
+
+








#import "OFKernelEventObserver.h"
#import "OFString.h"
#import "OFDate.h"
#import "OFTCPSocket.h"
#import "OFAutoreleasePool.h"

#if defined(HAVE_SYS_SELECT_H) || defined(OF_WINDOWS)
# import "OFKernelEventObserver_select.h"
#endif
#ifdef HAVE_KQUEUE
#if defined(HAVE_POLL_H) || defined(OF_WII)
# import "OFKernelEventObserver_poll.h"
# import "OFKernelEventObserver_kqueue.h"
#endif
#ifdef HAVE_EPOLL
# import "OFKernelEventObserver_epoll.h"
#endif
#ifdef HAVE_POLL
# import "OFKernelEventObserver_poll.h"
#endif
#ifdef HAVE_KQUEUE
# import "OFKernelEventObserver_kqueue.h"
#ifdef HAVE_SELECT
# import "OFKernelEventObserver_select.h"
#endif

#import "TestsAppDelegate.h"

#define EXPECTED_EVENTS 3

static OFString *module;
220
221
222
223
224
225
226
227

228
229
230
231
232

233
234
235
236
237
238
239
220
221
222
223
224
225
226

227
228
229
230
231

232
233
234
235
236
237
238
239







-
+




-
+







	_fails += test->_fails;
}

- (void)kernelEventObserverTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];

#if defined(HAVE_SYS_SELECT_H) || defined(OF_WINDOWS)
#ifdef HAVE_SELECT
	[self kernelEventObserverTestsWithClass:
	    [OFKernelEventObserver_select class]];
#endif

#if defined(HAVE_POLL_H) || defined(OF_WII)
#ifdef HAVE_POLL
	[self kernelEventObserverTestsWithClass:
	    [OFKernelEventObserver_poll class]];
#endif

#ifdef HAVE_EPOLL
	[self kernelEventObserverTestsWithClass:
	    [OFKernelEventObserver_epoll class]];