X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-compat-util.h;h=40498b33c9f09ef9cac1f7340a9a1ceb2ffcd50d;hb=3bee6a4733a1ff03b9cc659ea026c6dc17567d4d;hp=79b5122b4f75697413b23b45646813bef8705ba9;hpb=ebae9ff95de2d0b36b061c7db833df4f7e01a41d;p=git.git diff --git a/git-compat-util.h b/git-compat-util.h index 79b5122b4..40498b33c 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -539,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).