Merge pull request #2979 from akoeplinger/tests-simplify
[mono.git] / mono / utils / mono-publib.h
index 30c807043998a61ef995c29c63f3ffe1ac79524d..53d4aa3ea7f4bed28874b023c70f33b9fd9cd490 100644 (file)
@@ -73,6 +73,18 @@ MONO_API void mono_free (void *);
 
 #define MONO_CONST_RETURN const
 
+/*
+ * When embedding, you have to define MONO_ZERO_LEN_ARRAY before including any
+ * other Mono header file if you use a different compiler from the one used to
+ * build Mono.
+ */
+#ifndef MONO_ZERO_LEN_ARRAY
+#ifdef __GNUC__
+#define MONO_ZERO_LEN_ARRAY 0
+#else
+#define MONO_ZERO_LEN_ARRAY 1
+#endif
+#endif
 
 #if defined (MONO_INSIDE_RUNTIME)