add win32 support, and using shared fd in {static|dynamic}_file_{single|rotate} function.

add win32 support, and using shared fd in output function which significantly speed up.