From 2acf403bcda303b27acc092c5fe4e165ec4f6614 Mon Sep 17 00:00:00 2001 From: Benno Evers Date: Wed, 3 Jan 2018 12:05:12 +0100 Subject: [PATCH] Dont include `ios.h` unconditionally. The include in tz.cpp was changed to only include the ios.h header when compiling on apple platforms, as the documentation states that only the four files date.h, tz.h, tz_private.h, and tz.cpp should be required to use the time zone library. Additionally, the ios.mm file was moved to src/ since it contains C++ source code. --- {include/date => src}/ios.mm | 0 src/tz.cpp | 7 ++++--- 2 files changed, 4 insertions(+), 3 deletions(-) rename {include/date => src}/ios.mm (100%) diff --git a/include/date/ios.mm b/src/ios.mm similarity index 100% rename from include/date/ios.mm rename to src/ios.mm diff --git a/src/tz.cpp b/src/tz.cpp index 325a593..42c9d76 100644 --- a/src/tz.cpp +++ b/src/tz.cpp @@ -84,10 +84,11 @@ #endif // _WIN32 #include "date/tz_private.h" -#include "date/ios.h" -#ifndef __APPLE__ -# define TARGET_OS_IPHONE 0 +#ifdef __APPLE__ +# include "ios.h" +#else +# define TARGET_OS_IPHONE 0 #endif #if USE_OS_TZDB