Fix build on debian ports that differs from generic i386/x86_64 like kFreeBSD

Patch by Kevin Roy, thanks!
This commit is contained in:
Sergey Sharybin 2012-01-26 10:36:36 +00:00
parent 969c87b5af
commit dbe432f73f
2 changed files with 8 additions and 6 deletions

@ -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

@ -133,8 +133,10 @@
/* 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