Added _WIN32, fixed compiler warnings