diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-10-29 16:02:21 (GMT) |
|---|---|---|
| committer | Kevin Smith <kevin.smith@isode.com> | 2015-10-30 12:49:29 (GMT) |
| commit | 8719b25e0dda4c8dae30c86ff88315e0e7fa9e1c (patch) | |
| tree | deb01d4eeadf3114b11279518d6d67a5100f54d3 | |
| parent | cb62de17d1e17fd3049a6bc8155a100574a42a85 (diff) | |
| download | swift-8719b25e0dda4c8dae30c86ff88315e0e7fa9e1c.zip swift-8719b25e0dda4c8dae30c86ff88315e0e7fa9e1c.tar.bz2 | |
Remove Boost workaround for OS X headers
Older versions of OS X define the same symbol as Boost does.
The workaround, defining
__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES as 0
worked around this issue, however __ prefixed defines are
considered private and cause the warning
"macro name is a reserved identifier [-Wreserved-id-macro]".
Test-Information:
Builds and unit tests pass on OS X 10.10.5.
Change-Id: I489ec201dc31fb4e43336da690c7d348a7d0d9ca
| -rw-r--r-- | Slimber/Cocoa/CocoaController.h | 6 | ||||
| -rw-r--r-- | Slimber/Cocoa/CocoaController.mm | 14 | ||||
| -rw-r--r-- | Slimber/Cocoa/CocoaMenulet.h | 8 | ||||
| -rw-r--r-- | SwifTools/Dock/MacOSXDock.mm | 7 |
4 files changed, 21 insertions, 14 deletions
diff --git a/Slimber/Cocoa/CocoaController.h b/Slimber/Cocoa/CocoaController.h index 8f42fbf..f6881ae 100644 --- a/Slimber/Cocoa/CocoaController.h +++ b/Slimber/Cocoa/CocoaController.h | |||
| @@ -1,13 +1,13 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2012 Isode Limited. | 2 | * Copyright (c) 2010-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | // Fix Boost-Cocoa conflict | 7 | #pragma once |
| 8 | #define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 | 8 | |
| 9 | #include <Cocoa/Cocoa.h> | 9 | #include <Cocoa/Cocoa.h> |
| 10 | 10 | ||
| 11 | class MainController; | 11 | class MainController; |
| 12 | class CocoaMenulet; | 12 | class CocoaMenulet; |
| 13 | 13 | ||
diff --git a/Slimber/Cocoa/CocoaController.mm b/Slimber/Cocoa/CocoaController.mm index 2ee350d..da1df98 100644 --- a/Slimber/Cocoa/CocoaController.mm +++ b/Slimber/Cocoa/CocoaController.mm | |||
| @@ -1,10 +1,16 @@ | |||
| 1 | #include "Slimber/Cocoa/CocoaController.h" | 1 | /* |
| 2 | * Copyright (c) 2015 Isode Limited. | ||
| 3 | * All rights reserved. | ||
| 4 | * See the COPYING file for more information. | ||
| 5 | */ | ||
| 2 | 6 | ||
| 3 | #include "Slimber/MainController.h" | 7 | #include <Slimber/Cocoa/CocoaController.h> |
| 4 | #include "Slimber/Cocoa/CocoaMenulet.h" | 8 | |
| 5 | #include "Slimber/Cocoa/main.h" | 9 | #include <Slimber/MainController.h> |
| 10 | #include <Slimber/Cocoa/CocoaMenulet.h> | ||
| 11 | #include <Slimber/Cocoa/main.h> | ||
| 6 | 12 | ||
| 7 | @implementation CocoaController { | 13 | @implementation CocoaController { |
| 8 | CocoaMenulet* menulet; | 14 | CocoaMenulet* menulet; |
| 9 | MainController* main; | 15 | MainController* main; |
| 10 | } | 16 | } |
diff --git a/Slimber/Cocoa/CocoaMenulet.h b/Slimber/Cocoa/CocoaMenulet.h index fa4848e..887fdf9 100644 --- a/Slimber/Cocoa/CocoaMenulet.h +++ b/Slimber/Cocoa/CocoaMenulet.h | |||
| @@ -1,24 +1,22 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2012 Isode Limited. | 2 | * Copyright (c) 2010-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | // Fix Boost-Cocoa conflict | ||
| 10 | #define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 | ||
| 11 | #include <Cocoa/Cocoa.h> | 9 | #include <Cocoa/Cocoa.h> |
| 10 | #include <Slimber/Menulet.h> | ||
| 12 | 11 | ||
| 13 | #include "Slimber/Menulet.h" | ||
| 14 | #include <SwifTools/Cocoa/CocoaAction.h> | 12 | #include <SwifTools/Cocoa/CocoaAction.h> |
| 15 | 13 | ||
| 16 | class CocoaMenulet : public Menulet { | 14 | class CocoaMenulet : public Menulet { |
| 17 | public: | 15 | public: |
| 18 | CocoaMenulet(); | 16 | CocoaMenulet(); |
| 19 | ~CocoaMenulet(); | 17 | virtual ~CocoaMenulet(); |
| 20 | 18 | ||
| 21 | private: | 19 | private: |
| 22 | virtual void clear(); | 20 | virtual void clear(); |
| 23 | virtual void addItem(const std::string& name, const std::string& icon); | 21 | virtual void addItem(const std::string& name, const std::string& icon); |
| 24 | virtual void addSeparator(); | 22 | virtual void addSeparator(); |
diff --git a/SwifTools/Dock/MacOSXDock.mm b/SwifTools/Dock/MacOSXDock.mm index 3164998..8c196d8 100644 --- a/SwifTools/Dock/MacOSXDock.mm +++ b/SwifTools/Dock/MacOSXDock.mm | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | // Fix Boost-Cocoa conflict | 1 | /* |
| 2 | #define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 | 2 | * Copyright (c) 2015 Isode Limited. |
| 3 | * All rights reserved. | ||
| 4 | * See the COPYING file for more information. | ||
| 5 | */ | ||
| 3 | 6 | ||
| 4 | #include <SwifTools/Dock/MacOSXDock.h> | 7 | #include <SwifTools/Dock/MacOSXDock.h> |
| 5 | 8 | ||
| 6 | #include <AppKit/AppKit.h> | 9 | #include <AppKit/AppKit.h> |
| 7 | #include <Cocoa/Cocoa.h> | 10 | #include <Cocoa/Cocoa.h> |
Swift