Merge branch 'rs/hex2chr' into maint
[gitweb.git] / git-compat-util.h
index db89ba774891a9608531e52252de19d552cbf535..68615b1a6a4db0f4ba7b4ce543e00e31e3b1705e 100644 (file)
@@ -436,6 +436,7 @@ static inline int const_error(void)
        return -1;
 }
 #define error(...) (error(__VA_ARGS__), const_error())
+#define error_errno(...) (error_errno(__VA_ARGS__), const_error())
 #endif
 
 extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));
@@ -663,6 +664,14 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
                 const void *needle, size_t needlelen);
 #endif
 
+#ifdef OVERRIDE_STRDUP
+#ifdef strdup
+#undef strdup
+#endif
+#define strdup gitstrdup
+char *gitstrdup(const char *s);
+#endif
+
 #ifdef NO_GETPAGESIZE
 #define getpagesize() sysconf(_SC_PAGESIZE)
 #endif