Merge branch 'fc/show-non-empty-errors-in-test'
[gitweb.git] / compat / win32.h
index c26384e595b4f23d5fef938b1136cc3a85469e56..a97e880757b6f1328fea90371da8f857648e6923 100644 (file)
@@ -1,5 +1,10 @@
+#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)
 {
@@ -32,3 +37,5 @@ static inline int get_file_attr(const char *fname, WIN32_FILE_ATTRIBUTE_DATA *fd
                return ENOENT;
        }
 }
+
+#endif