summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2006-11-26 03:18:51 +0000
committerroot <root>2006-11-26 03:18:51 +0000
commitcdc216f88c811a8683cdb6637370dd046f619b58 (patch)
tree801b8bbde315b3e77292601d047c54dbdb3eb331
parent7da7950aec21751e011efce813aa5a42a3dc7687 (diff)
*** empty log message ***
-rw-r--r--coro.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/coro.h b/coro.h
index 8f7a796..6a2b632 100644
--- a/coro.h
+++ b/coro.h
@@ -38,7 +38,7 @@
/*
* 2006-10-26 Include stddef.h on OS X to work around one of its bugs.
* Reported by Michael_G_Schwern.
- * 2006-11-25 Use _setjmp instead of setjmp on GNU/Linux.
+ * 2006-11-26 Use _setjmp instead of setjmp on GNU/Linux.
*/
#ifndef CORO_H
@@ -171,7 +171,11 @@ struct coro_context {
jmp_buf env;
};
-#define coro_transfer(p,n) do { if (!setjmp ((p)->env)) longjmp ((n)->env, 1); } while(0)
+#if CORO_LINUX
+# define coro_transfer(p,n) do { if (!_setjmp ((p)->env)) _longjmp ((n)->env, 1); } while(0)
+#else
+# define coro_transfer(p,n) do { if (!setjmp ((p)->env)) longjmp ((n)->env, 1); } while(0)
+#endif
#endif