Merge branch 'rs/daemon-fixes' into maint
[gitweb.git] / git-compat-util.h
index 0b53c9a4af3c7e1d5611065b35ef38f3f1f5e5be..f587749b7cf6a74be376792eb0ad70b7e5e4f597 100644 (file)
@@ -291,10 +291,12 @@ extern char *gitbasename(char *);
 #else
 #define NORETURN
 #define NORETURN_PTR
+#ifndef __GNUC__
 #ifndef __attribute__
 #define __attribute__(x)
 #endif
 #endif
+#endif
 
 /* The sentinel attribute is valid from gcc version 4.0 */
 #if defined(__GNUC__) && (__GNUC__ >= 4)
@@ -729,17 +731,6 @@ void git_qsort(void *base, size_t nmemb, size_t size,
 #endif
 #endif
 
-#if defined(__GNUC__) && defined(__x86_64__)
-#include <emmintrin.h>
-/*
- * This is the system memory page size; it's used so that we can read
- * outside the bounds of an allocation without segfaulting.
- */
-#ifndef PAGE_SIZE
-#define PAGE_SIZE 4096
-#endif
-#endif
-
 #ifdef UNRELIABLE_FSTAT
 #define fstat_is_reliable() 0
 #else
@@ -759,6 +750,10 @@ void git_qsort(void *base, size_t nmemb, size_t size,
 #endif
 #endif
 
+#if defined(__GNUC__) || (_MSC_VER >= 1400)
+#define HAVE_VARIADIC_MACROS 1
+#endif
+
 /*
  * Preserves errno, prints a message, but gives no warning for ENOENT.
  * Always returns the return value of unlink(2).