ObjFW  Check-in [4de1f2a67a]

Overview
Comment:Move netinet/in.h include to socket.h

This is required as OFKernelEventObserver uses struct sockaddr_in as an
instance variable in case there is no pipe().

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4de1f2a67a8e52cbe7846eb87386fadf057a7ab7efd1eee25a934825ff534dd3
User & Date: js on 2014-03-05 00:31:49
Other Links: manifest | tags
Context
2014-03-05
00:34
OFKernelEventObserver: Only use 1 internal socket check-in: a2f2a3289d user: js tags: trunk
00:31
Move netinet/in.h include to socket.h check-in: 4de1f2a67a user: js tags: trunk
00:15
OFThread.m: Fix missing define for PSP check-in: a4986b3356 user: js tags: trunk
Changes

Modified configure.ac from [bc2e61633f] to [a36973b980].

621
622
623
624
625
626
627
628





629
630
631
632
633
634
635
621
622
623
624
625
626
627

628
629
630
631
632
633
634
635
636
637
638
639







-
+
+
+
+
+







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

	AC_CHECK_HEADER(sys/socket.h, [
		AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1,
			[Whether we have sys/socket.h])
	])
	AC_CHECK_HEADERS([netinet/in.h arpa/inet.h netdb.h])
	AC_CHECK_HEADERS(netinet/in.h, [
		AC_DEFINE(OF_HAVE_NETINET_IN_H, 1,
			[Whether we have netinet/in.h])
	])
	AC_CHECK_HEADERS([arpa/inet.h netdb.h])

	AC_CHECK_FUNC(kqueue, [
		AC_DEFINE(HAVE_KQUEUE, 1, [Whether we have kqueue])
		AC_SUBST(OFKERNELEVENTOBSERVER_KQUEUE_M,
			"OFKernelEventObserver_kqueue.m")
	])
	AC_CHECK_HEADER(poll.h, [

Modified src/objfw-defs.h.in from [1adc067354] to [aa4090a098].

1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21













+







#undef OF_APPLE_RUNTIME
#undef OF_BIG_ENDIAN
#undef OF_FLOAT_BIG_ENDIAN
#undef OF_HAVE_ASPRINTF
#undef OF_HAVE_ATOMIC_OPS
#undef OF_HAVE_CHMOD
#undef OF_HAVE_CHOWN
#undef OF_HAVE_COMPILER_TLS
#undef OF_HAVE_FILES
#undef OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
#undef OF_HAVE_GCC_ATOMIC_OPS
#undef OF_HAVE_LINK
#undef OF_HAVE_MAX_ALIGN_T
#undef OF_HAVE_NETINET_IN_H
#undef OF_HAVE_OSATOMIC
#undef OF_HAVE_OSATOMIC_64
#undef OF_HAVE_PIPE
#undef OF_HAVE_PLUGINS
#undef OF_HAVE_PROCESSES
#undef OF_HAVE_PTHREADS
#undef OF_HAVE_PTHREAD_SPINLOCKS

Modified src/socket.h from [9ed038db51] to [bc099d612b].

20
21
22
23
24
25
26



27
28
29
30
31
32
33
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36







+
+
+







# error No sockets available!
#endif

#include <stdbool.h>

#ifdef OF_HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef OF_HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif

#ifdef _WIN32
# ifdef __MINGW32__
#  include <_mingw.h>
#  ifdef __MINGW64_VERSION_MAJOR
#   include <winsock2.h>

Modified src/socket_helpers.h from [278174d7fd] to [59991e1a1b].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
12
13
14
15
16
17
18



19
20
21
22
23
24
25







-
-
-







 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include <unistd.h>

#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif