git-sh-setup.sh: add variable to use the stuck-long mode
[gitweb.git] / compat / mingw.h
index 3c3a9d925e1ec9d44b5d38858c864f22bec8669c..e033e720c900c430a0a74b0223522c396cb66629 100644 (file)
@@ -180,9 +180,6 @@ int mingw_rmdir(const char *path);
 int mingw_open (const char *filename, int oflags, ...);
 #define open mingw_open
 
-ssize_t mingw_write(int fd, const void *buf, size_t count);
-#define write mingw_write
-
 int mingw_fgetc(FILE *stream);
 #define fgetc mingw_fgetc
 
@@ -271,11 +268,20 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
 #define lseek _lseeki64
 
 /* use struct stat with 64 bit st_size */
+#ifdef stat
+#undef stat
+#endif
 #define stat _stati64
 int mingw_lstat(const char *file_name, struct stat *buf);
 int mingw_stat(const char *file_name, struct stat *buf);
 int mingw_fstat(int fd, struct stat *buf);
+#ifdef fstat
+#undef fstat
+#endif
 #define fstat mingw_fstat
+#ifdef lstat
+#undef lstat
+#endif
 #define lstat mingw_lstat
 
 #ifndef _stati64
@@ -335,6 +341,7 @@ static inline char *mingw_find_last_dir_sep(const char *path)
 #define find_last_dir_sep mingw_find_last_dir_sep
 #define PATH_SEP ';'
 #define PRIuMAX "I64u"
+#define PRId64 "I64d"
 
 void mingw_open_html(const char *path);
 #define open_html mingw_open_html