diff -r ddf15cd9be4a Modules/posixmodule.c --- a/Modules/posixmodule.c Thu Jul 26 18:12:07 2012 -0400 +++ b/Modules/posixmodule.c Fri Jul 27 12:57:54 2012 +0900 @@ -1509,7 +1509,7 @@ } /* Grab GetFinalPathNameByHandle dynamically from kernel32 */ -static int has_GetFinalPathNameByHandle = 0; +static int has_GetFinalPathNameByHandle = -1; static DWORD (CALLBACK *Py_GetFinalPathNameByHandleW)(HANDLE, LPWSTR, DWORD, DWORD); static int @@ -1520,7 +1520,7 @@ DWORD); /* only recheck */ - if (!has_GetFinalPathNameByHandle) + if (-1 == has_GetFinalPathNameByHandle) { hKernel32 = GetModuleHandleW(L"KERNEL32"); *(FARPROC*)&Py_GetFinalPathNameByHandleA = GetProcAddress(hKernel32,