]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-compat-util.h
mingw: fix quoting of empty arguments for `sh`
[thirdparty/git.git] / git-compat-util.h
index 29a19902aaa00b90176e253c90c2384fca65857c..4d62ad3491bcc8fcea2fb0ce4784ad00671fe966 100644 (file)
@@ -386,6 +386,10 @@ static inline int git_offset_1st_component(const char *path)
 #define offset_1st_component git_offset_1st_component
 #endif
 
+#ifndef is_valid_path
+#define is_valid_path(path) 1
+#endif
+
 #ifndef find_last_dir_sep
 static inline char *git_find_last_dir_sep(const char *path)
 {
@@ -1234,6 +1238,14 @@ struct tm *git_gmtime_r(const time_t *, struct tm *);
 #define getc_unlocked(fh) getc(fh)
 #endif
 
+#ifdef FILENO_IS_A_MACRO
+int git_fileno(FILE *stream);
+# ifndef COMPAT_CODE
+#  undef fileno
+#  define fileno(p) git_fileno(p)
+# endif
+#endif
+
 /*
  * Our code often opens a path to an optional file, to work on its
  * contents when we can successfully open it.  We can ignore a failure