+#ifndef WIN32_H
+#define WIN32_H
+
 /* common Win32 functions for MinGW and Cygwin */
+#ifndef GIT_WINDOWS_NATIVE     /* Not defined for Cygwin */
 #include <windows.h>
+#endif
 
 static inline int file_attr_to_st_mode (DWORD attr)
 {
                return ENOENT;
        }
 }
+
+#endif