checkout: tweak detached-orphan warning format
[gitweb.git] / git-compat-util.h
index 00d41e4f0e9c2356427f38abec317fac8fa452a4..49b50eec86828066c90b6165c35ec21cb51e85ce 100644 (file)
@@ -214,7 +214,10 @@ extern char *gitbasename(char *);
 #define is_dir_sep(c) ((c) == '/')
 #endif
 
-#ifdef __GNUC__
+#if __HP_cc >= 61000
+#define NORETURN __attribute__((noreturn))
+#define NORETURN_PTR
+#elif defined(__GNUC__)
 #define NORETURN __attribute__((__noreturn__))
 #define NORETURN_PTR __attribute__((__noreturn__))
 #elif defined(_MSC_VER)
@@ -536,7 +539,16 @@ void git_qsort(void *base, size_t nmemb, size_t size,
 #endif
 
 #ifndef va_copy
-#define va_copy(dst,src) (dst) = (src)
+/*
+ * 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
 
 /*