]> git.ipfire.org Git - thirdparty/git.git/blobdiff - compat/mingw.h
Merge branch 'lt/default-abbrev' into maint
[thirdparty/git.git] / compat / mingw.h
index 228307110971c7b3259953730687c0e90b07a49c..14211c6214ea4654e0bb9dd25b29d7b28ac6141d 100644 (file)
@@ -14,12 +14,6 @@ typedef int socklen_t;
 #define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
 #define S_ISSOCK(x) 0
 
-#ifndef _STAT_H_
-#define S_IRUSR 0
-#define S_IWUSR 0
-#define S_IXUSR 0
-#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
-#endif
 #define S_IRGRP 0
 #define S_IWGRP 0
 #define S_IXGRP 0
@@ -239,6 +233,22 @@ int mingw_getpagesize(void);
 #define getpagesize mingw_getpagesize
 #endif
 
+struct rlimit {
+       unsigned int rlim_cur;
+};
+#define RLIMIT_NOFILE 0
+
+static inline int getrlimit(int resource, struct rlimit *rlp)
+{
+       if (resource != RLIMIT_NOFILE) {
+               errno = EINVAL;
+               return -1;
+       }
+
+       rlp->rlim_cur = 2048;
+       return 0;
+}
+
 /* Use mingw_lstat() instead of lstat()/stat() and
  * mingw_fstat() instead of fstat() on Windows.
  */