Skip to content

Commit

Permalink
Add some more TARGET_XYZ defines to argetConditionals.h
Browse files Browse the repository at this point in the history
  • Loading branch information
cjones051073 committed Jun 11, 2021
1 parent 5b5cb1d commit 264de2b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ Wrapped headers and replaced functions are:
<tr>
<td><code>TargetConditionals.h</code></td>
<td>Adds definitions for <code>TARGET_CPU_ARM</code>, <code>TARGET_CPU_ARM64</code>,
<code>TARGET_OS_SIMULATOR</code> and <code>TARGET_OS_OSX</code> if needed.</td>
<code>TARGET_OS_SIMULATOR</code>, <code>TARGET_OS_IOS</code>, <code>TARGET_OS_TV</code>,
<code>TARGET_OS_WATCH</code> and <code>TARGET_OS_OSX</code> if needed.</td>
<td>OSX10.10</td>
</tr>
</table>
Expand Down
18 changes: 13 additions & 5 deletions include/TargetConditionals.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,23 @@

#include_next <TargetConditionals.h>

#ifndef TARGET_OS_OSX
# define TARGET_OS_OSX 1
#endif
/* We never support these OSes */
#ifndef TARGET_OS_SIMULATOR
# define TARGET_OS_SIMULATOR 0
#endif

#ifndef TARGET_OS_OSX
# define TARGET_OS_OSX 1
#ifndef TARGET_OS_IOS
# define TARGET_OS_IOS 0
#endif

/* If not set, will never be true */
#ifndef TARGET_OS_TV
# define TARGET_OS_TV 0
#endif
#ifndef TARGET_OS_WATCH
# define TARGET_OS_WATCH 0
#endif
/* If not defined, OS will never support ARM */
#ifndef TARGET_CPU_ARM
# define TARGET_CPU_ARM 0
#endif
Expand Down

0 comments on commit 264de2b

Please sign in to comment.