summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2009-06-23 00:56:14 +0000
committerroot <root>2009-06-23 00:56:14 +0000
commitdf12ba153cdd696420678d7cd5905ca9cd26852f (patch)
tree3d5dcbe2746d860b3b39739b7bc74207b3bb5593
parent7f7a3f778dd0857b7e0a04e3734493d96bc4e863 (diff)
*** empty log message ***rel-5_151
-rw-r--r--coro.c3
-rw-r--r--coro.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/coro.c b/coro.c
index cce35ce..0298fe7 100644
--- a/coro.c
+++ b/coro.c
@@ -228,6 +228,9 @@ coro_create (coro_context *ctx, coro_func coro, void *arg, void *sptr, long ssiz
#if __CYGWIN__
ctx->env[7] = (long)((char *)sptr + ssize) - sizeof (long);
ctx->env[8] = (long)coro_init;
+ #elif defined(__MINGW32__)
+ ctx->env[4] = (long)((char *)sptr + ssize) - sizeof (long);
+ ctx->env[5] = (long)coro_init;
#elif defined(_M_IX86)
((_JUMP_BUFFER *)&ctx->env)->Eip = (long)coro_init;
((_JUMP_BUFFER *)&ctx->env)->Esp = (long)STACK_ADJUST_PTR (sptr, ssize) - sizeof (long);
diff --git a/coro.h b/coro.h
index 8ca8d39..33d5323 100644
--- a/coro.h
+++ b/coro.h
@@ -68,6 +68,7 @@
* 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).
*/
#ifndef CORO_H