ObjFW  Check-in [f9208b6837]

Overview
Comment:Fix detection of macOS
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f9208b6837f50b545a053b857e03330278c69aab6ef3d5ce67892496404b5ded
User & Date: js on 2020-11-28 11:07:08
Other Links: manifest | tags
Context
2020-11-28
19:28
Fix building for Windows check-in: 4a7b3657d0 user: js tags: trunk
11:07
Fix detection of macOS check-in: f9208b6837 user: js tags: trunk
2020-11-27
00:02
Fix compiling for Wii check-in: 556fd200b0 user: js tags: trunk
Changes

Modified configure.ac from [bd44ce35bc] to [94728735e5].

1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595

case "$host_os" in
	darwin*)
		AC_MSG_CHECKING(whether we are compiling for macOS)
		AC_EGREP_CPP(egrep_cpp_yes, [
			#include <TargetConditionals.h>

			#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
			egrep_cpp_yes
			#endif
		], [
			AC_MSG_RESULT(yes)
			have_processes="yes"
		], [
			AC_MSG_RESULT(no)







|







1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595

case "$host_os" in
	darwin*)
		AC_MSG_CHECKING(whether we are compiling for macOS)
		AC_EGREP_CPP(egrep_cpp_yes, [
			#include <TargetConditionals.h>

			#if defined(TARGET_OS_OSX) && TARGET_OS_OSX
			egrep_cpp_yes
			#endif
		], [
			AC_MSG_RESULT(yes)
			have_processes="yes"
		], [
			AC_MSG_RESULT(no)

Modified src/platform.h from [73e049bd9b] to [c42ebbf9ca].

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

#if defined(__APPLE__)
# include <TargetConditionals.h>
# if (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || \
    (defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR)
#  define OF_IOS
# endif
# if defined(TARGET_OS_MAC) && TARGET_OS_MAC
#  define OF_MACOS
# endif
#elif defined(__linux__)
# define OF_LINUX
#elif defined(_WIN32)
# define OF_WINDOWS
#elif defined(__FreeBSD__)







|







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

#if defined(__APPLE__)
# include <TargetConditionals.h>
# if (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || \
    (defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR)
#  define OF_IOS
# endif
# if defined(TARGET_OS_OSX) && TARGET_OS_OSX
#  define OF_MACOS
# endif
#elif defined(__linux__)
# define OF_LINUX
#elif defined(_WIN32)
# define OF_WINDOWS
#elif defined(__FreeBSD__)