ObjFW  Check-in [19ace65ba8]

Overview
Comment:Make sure the ABI of OFSocketAddress stays stable
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 19ace65ba81c2a102f5ea78901ec49b84e785a6216cb680d25c0b8c05688719e
User & Date: js on 2023-04-22 17:47:01
Other Links: manifest | tags
Context
2023-04-22
19:44
+[OFSystemInfo networkInterfaces]: Add MAC address check-in: 76861c3f78 user: js tags: trunk
17:47
Make sure the ABI of OFSocketAddress stays stable check-in: 19ace65ba8 user: js tags: trunk
17:27
utils/ofatalkcfg: Fix missing newline in output check-in: c401c7482d user: js tags: trunk
Changes

Modified configure.ac from [8e28bb9d96] to [9411580ad1].

1418
1419
1420
1421
1422
1423
1424














1425
1426
1427
1428
1429
1430
1431
		AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
		;;
	esac

	AC_CHECK_HEADER(sys/socket.h, [
		AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1,
			[Whether we have sys/socket.h])














	])

	AC_CHECK_HEADER(netinet/in.h, [
		AC_DEFINE(OF_HAVE_NETINET_IN_H, 1,
			[Whether we have netinet/in.h])
	])
	AC_CHECK_HEADER(netinet/tcp.h, [







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







1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
		AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
		;;
	esac

	AC_CHECK_HEADER(sys/socket.h, [
		AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1,
			[Whether we have sys/socket.h])
	])
	AC_CHECK_MEMBER([struct sockaddr_storage.ss_family], [
		AC_DEFINE(OF_HAVE_SOCKADDR_STORAGE, 1,
			[Whether we have struct sockaddr_storage])
	], [], [
		#ifdef OF_HAVE_SYS_TYPES_H
		# include <sys/types.h>
		#endif
		#ifdef OF_HAVE_SYS_SOCKET_H
		# include <sys/socket.h>
		#endif
		#ifdef _WIN32
		# include <winsock2.h>
		#endif
	])

	AC_CHECK_HEADER(netinet/in.h, [
		AC_DEFINE(OF_HAVE_NETINET_IN_H, 1,
			[Whether we have netinet/in.h])
	])
	AC_CHECK_HEADER(netinet/tcp.h, [

Modified src/OFSocket.h from [3c58ebd4cf] to [a60f73c777].

183
184
185
186
187
188
189







190
191
192
193
194
195
196
	 */
	union {
		struct sockaddr_in in;
		struct sockaddr_in6 in6;
		struct sockaddr_un un;
		struct sockaddr_ipx ipx;
		struct sockaddr_at at;







	} sockaddr;
	socklen_t length;
} OFSocketAddress;

#ifdef __cplusplus
extern "C" {
#endif







>
>
>
>
>
>
>







183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
	 */
	union {
		struct sockaddr_in in;
		struct sockaddr_in6 in6;
		struct sockaddr_un un;
		struct sockaddr_ipx ipx;
		struct sockaddr_at at;
#ifdef OF_HAVE_SOCKADDR_STORAGE
		/*
		 * Required to make the ABI stable in case we want to add more
		 * address types later.
		 */
		struct sockaddr_storage storage;
#endif
	} sockaddr;
	socklen_t length;
} OFSocketAddress;

#ifdef __cplusplus
extern "C" {
#endif

Modified src/objfw-defs.h.in from [af7372a4c7] to [b5f598373d].

30
31
32
33
34
35
36

37
38
39
40
41
42
43
#undef OF_HAVE_PIPE
#undef OF_HAVE_PLEDGE
#undef OF_HAVE_PLUGINS
#undef OF_HAVE_PTHREADS
#undef OF_HAVE_PTHREAD_SPINLOCKS
#undef OF_HAVE_RECURSIVE_PTHREAD_MUTEXES
#undef OF_HAVE_SCHED_YIELD

#undef OF_HAVE_SOCKETS
#undef OF_HAVE_STDNORETURN
#undef OF_HAVE_SUBPROCESSES
#undef OF_HAVE_SYMLINK
#undef OF_HAVE_SYNC_BUILTINS
#undef OF_HAVE_SYS_SOCKET_H
#undef OF_HAVE_SYS_TYPES_H







>







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#undef OF_HAVE_PIPE
#undef OF_HAVE_PLEDGE
#undef OF_HAVE_PLUGINS
#undef OF_HAVE_PTHREADS
#undef OF_HAVE_PTHREAD_SPINLOCKS
#undef OF_HAVE_RECURSIVE_PTHREAD_MUTEXES
#undef OF_HAVE_SCHED_YIELD
#undef OF_HAVE_SOCKADDR_STORAGE
#undef OF_HAVE_SOCKETS
#undef OF_HAVE_STDNORETURN
#undef OF_HAVE_SUBPROCESSES
#undef OF_HAVE_SYMLINK
#undef OF_HAVE_SYNC_BUILTINS
#undef OF_HAVE_SYS_SOCKET_H
#undef OF_HAVE_SYS_TYPES_H