Fix build on debian ports that differs from generic i386/x86_64 like kFreeBSD
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 26 Jan 2012 10:36:36 +0000 (10:36 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 26 Jan 2012 10:36:36 +0000 (10:36 +0000)
Patch by Kevin Roy, thanks!

extern/libmv/third_party/glog/src/config.h
extern/libmv/third_party/glog/src/config_linux.h

index 49c0d8905b0cc6ea37102211019f376e7a98fd5b..102bf9e4034d29ba8569ff5a2b8a29b8e503495b 100644 (file)
@@ -2,14 +2,14 @@
 /* src/config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* Namespace for Google classes */
-#ifdef __APPLE__
+#if defined(__APPLE__)
  #include "config_mac.h"
-#elif __FreeBSD__
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
  #include "config_freebsd.h"
-#elif __MINGW32__
+#elif defined(__MINGW32__)
  #include "windows/config.h"
-#elif __GNUC__
+#elif defined(__linux__)
  #include "config_linux.h"
-#elif _MSC_VER
+#elif defined(_MSC_VER)
  #include "windows/config.h"
 #endif
index ffd4e778de6eaeece0be56ed905545f059ac99c4..faf032949bb49e9c991037162cc1cd84a9e0e684 100644 (file)
 /* How to access the PC from a struct ucontext */
 #if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__)
   #define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_RIP]
-#else
+#elif defined(_M_IX86) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__)
   #define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_EIP]
+#else
+  #undef PC_FROM_UCONTEXT
 #endif
 
 /* Define to necessary symbol if this constant uses a non-standard name on