forked bug41655 test for windows
refixed printf fmt, used portable macros