Sim

Mac OS X compilation fix for Omni-bot

Sim
Oct 25th, 2013
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.08 KB | None | 0 0
  1. --- a/Omnibot/Common/common.h
  2. +++ b/Omnibot/Common/common.h
  3. @@ -332,10 +332,10 @@ enum MoveMode
  4.  
  5.  #include "Utilities.h"
  6.  
  7. -// cs: FIXME: debug version of OBASSERT doesnt build in linux. doesn't like __VA_ARGS__
  8. -#ifdef __linux__
  9. +// FIXME: debug version of OBASSERT doesn't build on linux and Mac. doesn't like __VA_ARGS__
  10. +#if defined(__linux__) || defined(__APPLE__)
  11.  #define OBASSERT(f, sz, ...) {}    // cs: for gcc warnings, was (f)
  12. -#else // !__linux__
  13. +#else // !__linux__, !__APPLE__
  14.  #ifdef _DEBUG
  15.  #define OBASSERT(f, msg, ...) { static bool bShowAssert = true; \
  16.     if(bShowAssert) { \
  17.  
  18. --- a/Omnibot/Jamfile
  19. +++ b/Omnibot/Jamfile
  20. @@ -22,10 +22,10 @@ project Omnibot
  21.      <include>dependencies/gmsrc_ex/src/3rdParty/gmbinder2
  22.      <toolset>msvc:<include>dependencies/gmsrc_ex/src/platform/win32msvc
  23.      <toolset>gcc:<include>dependencies/gmsrc_ex/src/platform/win32gcc
  24. -    <toolset>darwin:<include>dependencies/gmsrc_ex/src/platform/osx
  25. +    <toolset>darwin:<include>dependencies/gmsrc_ex/src/platform/win32gcc
  26.      <toolset>msvc:<define>WIN32
  27.      <toolset>gcc:<define>__linux__
  28. -    <toolset>darwin:<define>__osx__
  29. +    <toolset>darwin:<cxxflags>-w
  30.      <variant>debug:<define>_DEBUG
  31.      <variant>release:<define>NDEBUG
  32.     ;
  33.  
  34. deleted file mode 100644
  35. --- a/Omnibot/dependencies/gmsrc_ex/src/platform/osx/gmConfig_p.h
  36.  
  37. --- a/Omnibot/dependencies/gmsrc_ex/src/platform/win32gcc/gmConfig_p.h
  38. +++ b/Omnibot/dependencies/gmsrc_ex/src/platform/win32gcc/gmConfig_p.h
  39. @@ -12,7 +12,9 @@
  40.  #ifndef _GMCONFIG_P_H_
  41.  #define _GMCONFIG_P_H_
  42.  
  43. -#include <malloc.h>  // alloca
  44. +#ifndef __APPLE__
  45. +#   include <malloc.h>  // alloca
  46. +#endif
  47.  #include <new>
  48.  #include <cassert>
  49.  
  50. @@ -20,10 +22,9 @@
  51.  
  52.  // pragmas
  53.  
  54. -
  55.  // system defines
  56.  
  57. -#if defined(__linux__)
  58. +#if defined(__linux__) || defined(__APPLE__)
  59.    #define GM_LITTLE_ENDIAN      1
  60.    #define GM_COMPILER_GCC
  61.    #if defined(__LP64__) // 64bit target
  62. @@ -33,7 +34,6 @@
  63.      #define GM_DEFAULT_ALLOC_ALIGNMENT 4
  64.      #define GM_PTR_SIZE_32 // Ptr size is 32bit
  65.    #endif
  66. -//  #define GM_X86
  67.  #endif //__linux__
  68.  
  69.  #define GM_CDECL
Advertisement
Add Comment
Please, Sign In to add comment