From 97d5e3fa028f7d7d2ceef9fa9e6977d2f48d8810 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 4 Jul 2011 08:27:13 -0600 Subject: [PATCH] win32: fix place-specific scheduling semaphore --- src/racket/src/port.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/racket/src/port.c b/src/racket/src/port.c index d78b21bb7c..952b604306 100644 --- a/src/racket/src/port.c +++ b/src/racket/src/port.c @@ -547,8 +547,6 @@ scheme_init_port (Scheme_Env *env) scheme_redirect_output_port_type = scheme_make_port_type(""); #ifdef WIN32_FD_HANDLES - scheme_break_semaphore = (void*)CreateSemaphore(NULL, 0, 1, NULL); - /* We'll need to know whether this is Win95 or WinNT: */ { OSVERSIONINFO info; @@ -687,6 +685,10 @@ void scheme_init_port_places(void) } # endif #endif + +#ifdef WIN32_FD_HANDLES + scheme_break_semaphore = (void*)CreateSemaphore(NULL, 0, 1, NULL); +#endif flush_out = SCHEME_TRUEP(scheme_terminal_port_p(1, &scheme_orig_stdout_port)); flush_err = SCHEME_TRUEP(scheme_terminal_port_p(1, &scheme_orig_stderr_port));