Windows: Just use WaitForSingleObjectEx() everywhere. (It's supported on WinXP, no reason to have an #ifdef here...I think.)