Win32 and generic fix-ups