From a8c6a52a1ac9240c15a38f9b9a50b01096e09b41 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 16 Oct 2013 13:50:29 +0000 Subject: win32/setup.mak: check psapi.h * win32/setup.mak (check-psapi.h): check if psapi.h is available. * win32/win32.c (CHECK_CONSOLE_EMULATOR): enable console emulator DLL check only when psapi.h is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/win32.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'win32/win32.c') diff --git a/win32/win32.c b/win32/win32.c index 85daa61e88..46bdbf99e4 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -39,7 +39,12 @@ #include #include #include +#ifdef HAVE_PSAPI_H #include +# define CHECK_CONSOLE_EMULATOR 1 +#else +# define CHECK_CONSOLE_EMULATOR 0 +#endif #include #if _MSC_VER >= 1400 #include @@ -606,7 +611,11 @@ static CRITICAL_SECTION select_mutex; static int NtSocketsInitialized = 0; static st_table *socklist = NULL; static st_table *conlist = NULL; +#if CHECK_CONSOLE_EMULATOR #define conlist_disabled ((st_table *)-1) +#else +#define conlist_disabled ((st_table *)NULL) +#endif static char *envarea; static char *uenvarea; @@ -5834,6 +5843,7 @@ rb_w32_pipe(int fds[2]) return 0; } +#if CHECK_CONSOLE_EMULATOR /* License: Ruby's */ static int console_emulator_p(void) @@ -5860,6 +5870,9 @@ console_emulator_p(void) return 0; } +#else +#define console_emulator_p() 0 +#endif /* License: Ruby's */ static struct constat * -- cgit v1.2.3