From: Guido van Rossum Date: Wed, 13 Aug 1997 19:53:11 +0000 (+0000) Subject: Moved PyWin_IsWin32s() here. X-Git-Tag: v1.5a3~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e6ae93894b1383616d436dcfde2ebc1ad05ea4c;p=thirdparty%2FPython%2Fcpython.git Moved PyWin_IsWin32s() here. --- diff --git a/PC/import_nt.c b/PC/import_nt.c index 022b9e5aed1c..1eef4d27470e 100644 --- a/PC/import_nt.c +++ b/PC/import_nt.c @@ -11,7 +11,21 @@ #include #include "importdl.h" -extern BOOL PyWin_IsWin32s(); +/* Return whether this is Win32s, i.e., Win32 API on Win 3.1(1). + This function is exported! */ + +BOOL PyWin_IsWin32s() +{ + static BOOL bIsWin32s = -1; /* flag as "not yet looked" */ + + if (bIsWin32s == -1) { + OSVERSIONINFO ver; + ver.dwOSVersionInfoSize = sizeof(ver); + GetVersionEx(&ver); + bIsWin32s = ver.dwPlatformId == VER_PLATFORM_WIN32s; + } + return bIsWin32s; +} FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppFileDesc, char *pathBuf, int pathLen) {