--- libcoro/coro.h 2008/11/19 02:56:16 1.40 +++ libcoro/coro.h 2011/08/08 22:00:18 1.50 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2008 Marc Alexander Lehmann + * Copyright (c) 2001-2011 Marc Alexander Lehmann * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: @@ -68,11 +68,22 @@ * 2008-11-10 the .cfi hacks are no longer needed. * 2008-11-16 work around a freebsd pthread bug. * 2008-11-19 define coro_*jmp symbols for easier porting. + * 2009-06-23 tentative win32-backend support for mingw32 (Yasuhiro Matsumoto). + * 2010-12-03 tentative support for uclibc (which lacks all sorts of things). + * 2011-05-30 set initial callee-saved-registers to zero with CORO_ASM. + * use .cfi_undefined rip on linux-amd64 for better backtraces. + * 2011-06-08 maybe properly implement weird windows amd64 calling conventions. + * 2011-07-03 rely on __GCC_HAVE_DWARF2_CFI_ASM for cfi detection. + * 2011-08-08 cygwin trashes stacks, use pthreads with double stack on cygwin. */ #ifndef CORO_H #define CORO_H +#if __cplusplus +extern "C" { +#endif + #define CORO_VERSION 2 /* @@ -198,7 +209,7 @@ && !defined(CORO_SJLJ) && !defined(CORO_LINUX) \ && !defined(CORO_IRIX) && !defined(CORO_ASM) \ && !defined(CORO_PTHREAD) -# if defined(WINDOWS) +# if defined(WINDOWS) || defined(_WIN32) # define CORO_LOSER 1 /* you don't win with windoze */ # elif defined(__linux) && (defined(__x86) || defined (__amd64)) # define CORO_ASM 1 @@ -290,5 +301,9 @@ #endif +#if __cplusplus +} +#endif + #endif