From c17df6aca250a44460048f1239ad5f0e999dd90a Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Thu, 19 Oct 2017 17:07:38 -0400 Subject: [PATCH] Add platform definitions for other Apple operating systems. --- include/tidyplatform.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/tidyplatform.h b/include/tidyplatform.h index 3aa9b57..c617e87 100644 --- a/include/tidyplatform.h +++ b/include/tidyplatform.h @@ -111,10 +111,21 @@ extern "C" { # endif #elif defined(__APPLE__) && defined(__MACH__) -/* Mac OS X (client) 10.x (or server 1.x/10.x) - gcc or Metrowerks MachO compilers */ + /* Mac OS X (client) 10.x (or server 1.x/10.x) - gcc or Metrowerks MachO compilers */ # define MAC_OS_X # ifndef PLATFORM_NAME -# define PLATFORM_NAME "Mac OS X" +# include "TargetConditionals.h" +# if TARGET_OS_IOS +# define PLATFORM_NAME "Apple iOS" +# elif TARGET_OS_MAC +# define PLATFORM_NAME "Apple macOS" +# elif TARGET_OS_TV +# define PLATFORM_NAME "Apple tvOS" +# elif TARGET_OS_WATCH +# define PLATFORM_NAME "Apple watchOS" +# else +# define PLATFORM_NAME "Apple Unknown OS" +# endif # endif #endif