+/**
+ * \file
+ */
+
#ifndef __MONO_PUBLIB_H__
#define __MONO_PUBLIB_H__
#include <stdint.h>
#ifdef __GNUC__
-#define MONO_API_EXPORT __attribute__ ((visibility ("default")))
+#define MONO_API_EXPORT __attribute__ ((__visibility__ ("default")))
#else
#define MONO_API_EXPORT
#endif
#endif /* end of compiler-specific stuff */
+#include <stdlib.h>
+
#if defined(MONO_DLL_EXPORT)
#define MONO_API MONO_API_EXPORT
#elif defined(MONO_DLL_IMPORT)
MONO_API void mono_free (void *);
+#define MONO_ALLOCATOR_VTABLE_VERSION 1
+
+typedef struct {
+ int version;
+ void *(*malloc) (size_t size);
+ void *(*realloc) (void *mem, size_t count);
+ void (*free) (void *mem);
+ void *(*calloc) (size_t count, size_t size);
+} MonoAllocatorVTable;
+
+MONO_API mono_bool
+mono_set_allocator_vtable (MonoAllocatorVTable* vtable);
+
+
#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)
+
+#if defined (__clang__)
+#define MONO_RT_EXTERNAL_ONLY __attribute__ ((__unavailable__ ("The mono runtime must not call this function")))
+#elif defined (__GNUC__)
+#define MONO_RT_EXTERNAL_ONLY __attribute__ ((__error__ ("The mono runtime must not call this function")))
+#else
+#define MONO_RT_EXTERNAL_ONLY
+#endif /* __clang__ */
+
+#else
+#define MONO_RT_EXTERNAL_ONLY
+#endif /* MONO_INSIDE_RUNTIME */
+
+#ifdef __GNUC__
+#define _MONO_DEPRECATED __attribute__ ((__deprecated__))
+#elif defined (_MSC_VER)
+#define _MONO_DEPRECATED __declspec (deprecated)
+#else
+#define _MONO_DEPRECATED
+#endif
+
+#define MONO_DEPRECATED MONO_API MONO_RT_EXTERNAL_ONLY _MONO_DEPRECATED
+
MONO_END_DECLS
#endif /* __MONO_PUBLIB_H__ */