|
@@ -1,28 +1,6 @@
|
|
#ifndef GIT_COMPAT_UTIL_H
|
|
#ifndef GIT_COMPAT_UTIL_H
|
|
#define GIT_COMPAT_UTIL_H
|
|
#define GIT_COMPAT_UTIL_H
|
|
|
|
|
|
-#ifndef FLEX_ARRAY
|
|
|
|
-/*
|
|
|
|
- * See if our compiler is known to support flexible array members.
|
|
|
|
- */
|
|
|
|
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
|
|
|
-# define FLEX_ARRAY /* empty */
|
|
|
|
-#elif defined(__GNUC__)
|
|
|
|
-# if (__GNUC__ >= 3)
|
|
|
|
-# define FLEX_ARRAY /* empty */
|
|
|
|
-# else
|
|
|
|
-# define FLEX_ARRAY 0 /* older GNU extension */
|
|
|
|
-# endif
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-/*
|
|
|
|
- * Otherwise, default to safer but a bit wasteful traditional style
|
|
|
|
- */
|
|
|
|
-#ifndef FLEX_ARRAY
|
|
|
|
-# define FLEX_ARRAY 1
|
|
|
|
-#endif
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
|
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
|
|
|
|
|
#ifdef __GNUC__
|
|
#ifdef __GNUC__
|