diff options
Diffstat (limited to 'include/my_context.h')
-rw-r--r-- | include/my_context.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/my_context.h b/include/my_context.h index 0abf49efd43..1bf13fd1903 100644 --- a/include/my_context.h +++ b/include/my_context.h @@ -27,12 +27,14 @@ #ifdef __WIN__ #define MY_CONTEXT_USE_WIN32_FIBERS 1 -#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__x86_64__) +#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__x86_64__) && !defined(__ILP32__) #define MY_CONTEXT_USE_X86_64_GCC_ASM #elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__) #define MY_CONTEXT_USE_I386_GCC_ASM -#else +#elif defined(HAVE_UCONTEXT) #define MY_CONTEXT_USE_UCONTEXT +#else +#define MY_CONTEXT_DISABLE #endif #ifdef MY_CONTEXT_USE_WIN32_FIBERS @@ -104,6 +106,13 @@ struct my_context { #endif +#ifdef MY_CONTEXT_DISABLE +struct my_context { + int dummy; +}; +#endif + + /* Initialize an asynchroneous context object. Returns 0 on success, non-zero on failure. |