Skip to content

Commit

Permalink
Merge pull request #2621 from lisitsyn/fix/protobuf-macosx
Browse files Browse the repository at this point in the history
Fixed macosx ifdef in ProtobufFile
  • Loading branch information
lisitsyn committed Nov 19, 2014
2 parents e911b4a + c6c1c7e commit d63277d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/shogun/io/ProtobufFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@

#include <shogun/io/File.h>

#if defined(__APPLE__) && defined(TYPE_BOOL)
#define ___APPLE_TYPE_BOOL TYPE_BOOL
#undef TYPE_BOOL
// a hack to avoid clashes with apple's ConditionalMacros.h
#ifdef __APPLE__
#ifdef TYPE_BOOL
#define ___APPLE_TYPE_BOOL TYPE_BOOL
#undef TYPE_BOOL
#endif
#endif

#include <google/protobuf/message.h>

#if defined(__APPLE__) && defined(___APPLE_TYPE_BOOL)
#define TYPE_BOOL ___APPLE_TYPE_BOOL
#undef ___APPLE_TYPE_BOOL
#ifdef __APPLE__
#ifdef ___APPLE_TYPE_BOOL
#define TYPE_BOOL ___APPLE_TYPE_BOOL
#undef ___APPLE_TYPE_BOOL
#endif
#endif

#include <shogun/io/protobuf/ShogunVersion.pb.h>
Expand Down

0 comments on commit d63277d

Please sign in to comment.