From 2830ecec0a24035ddfe383475243b397841af289 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 10 May 2019 09:16:42 +0100 Subject: [PATCH] Prevented the Apple system headers from including some unnecessary C library headers --- modules/juce_core/juce_core.cpp | 1 + modules/juce_core/system/juce_StandardHeader.h | 3 +++ modules/juce_core/system/juce_SystemStats.cpp | 2 +- modules/juce_core/system/juce_TargetPlatform.h | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/juce_core/juce_core.cpp b/modules/juce_core/juce_core.cpp index 2e7c37c63d..f9d5ad2300 100644 --- a/modules/juce_core/juce_core.cpp +++ b/modules/juce_core/juce_core.cpp @@ -102,6 +102,7 @@ #if JUCE_MAC || JUCE_IOS #include #include + #include #endif #if JUCE_ANDROID diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index b588a2a6f0..9254c87b6f 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -70,6 +70,9 @@ #if JUCE_MAC || JUCE_IOS #include #include + #if JUCE_IOS + #include + #endif #endif #if JUCE_LINUX diff --git a/modules/juce_core/system/juce_SystemStats.cpp b/modules/juce_core/system/juce_SystemStats.cpp index 7d1347413e..0520840c4a 100644 --- a/modules/juce_core/system/juce_SystemStats.cpp +++ b/modules/juce_core/system/juce_SystemStats.cpp @@ -197,7 +197,7 @@ static LONG WINAPI handleCrash (LPEXCEPTION_POINTERS ep) static void handleCrash (int signum) { globalCrashHandler ((void*) (pointer_sized_int) signum); - kill (getpid(), SIGKILL); + ::kill (getpid(), SIGKILL); } int juce_siginterrupt (int sig, int flag); diff --git a/modules/juce_core/system/juce_TargetPlatform.h b/modules/juce_core/system/juce_TargetPlatform.h index 1bcc6dcc1e..d91c219aab 100644 --- a/modules/juce_core/system/juce_TargetPlatform.h +++ b/modules/juce_core/system/juce_TargetPlatform.h @@ -68,6 +68,7 @@ #elif defined (LINUX) || defined (__linux__) #define JUCE_LINUX 1 #elif defined (__APPLE_CPP__) || defined (__APPLE_CC__) + #define CF_EXCLUDE_CSTD_HEADERS 1 #include // (needed to find out what platform we're using) #include "../native/juce_mac_ClangBugWorkaround.h"