]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-compat-util.h
Merge git://git.bogomips.org/git-svn
[thirdparty/git.git] / git-compat-util.h
index bf947b1ec361aafeef58d43ef8eae979699b35ac..40498b33c9f09ef9cac1f7340a9a1ceb2ffcd50d 100644 (file)
 #endif
 #ifndef __MINGW32__
 #include <sys/wait.h>
+#include <sys/resource.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <termios.h>
@@ -538,6 +539,19 @@ void git_qsort(void *base, size_t nmemb, size_t size,
 #define fstat_is_reliable() 1
 #endif
 
+#ifndef va_copy
+/*
+ * Since an obvious implementation of va_list would be to make it a
+ * pointer into the stack frame, a simple assignment will work on
+ * many systems.  But let's try to be more portable.
+ */
+#ifdef __va_copy
+#define va_copy(dst, src) __va_copy(dst, src)
+#else
+#define va_copy(dst, src) ((dst) = (src))
+#endif
+#endif
+
 /*
  * Preserves errno, prints a message, but gives no warning for ENOENT.
  * Always returns the return value of unlink(2).