From 8c30681105db63b4695f2c2b3e31ec3d694cf973 Mon Sep 17 00:00:00 2001 From: Paolo Molaro Date: Wed, 24 Feb 2010 15:16:04 +0000 Subject: [PATCH] Wed Feb 24 15:50:55 CET 2010 Paolo Molaro * mono-publib.h, mono-publib.c: new public header file to allow the removal of gli from the other public headers. * Makefile.am: install only the public header mono-publib.h. svn path=/trunk/mono/; revision=152355 --- mono/utils/ChangeLog | 7 ++++++ mono/utils/Makefile.am | 16 +++++++------ mono/utils/mono-publib.c | 10 ++++++++ mono/utils/mono-publib.h | 51 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 mono/utils/mono-publib.c create mode 100644 mono/utils/mono-publib.h diff --git a/mono/utils/ChangeLog b/mono/utils/ChangeLog index 3b185b9df4d..c9882f4ee86 100644 --- a/mono/utils/ChangeLog +++ b/mono/utils/ChangeLog @@ -1,3 +1,10 @@ + +Wed Feb 24 15:50:55 CET 2010 Paolo Molaro + + * mono-publib.h, mono-publib.c: new public header file to allow + the removal of gli from the other public headers. + * Makefile.am: install only the public header mono-publib.h. + 2010-02-19 Gonzalo Paniagua Javier * mono-semaphore.h: enable the #defines when io-layer is in use. diff --git a/mono/utils/Makefile.am b/mono/utils/Makefile.am index aa011532875..1b45d2fe851 100644 --- a/mono/utils/Makefile.am +++ b/mono/utils/Makefile.am @@ -42,6 +42,7 @@ libmonoutils_la_SOURCES = \ mono-networkinterfaces.h \ mono-proclib.c \ mono-proclib.h \ + mono-publib.c \ mono-string.h \ mono-time.c \ mono-time.h \ @@ -68,12 +69,6 @@ libmonoutils_la_SOURCES = \ gc_wrapper.h \ mono-error.c \ mono-error-internals.h \ - valgrind.h \ - memcheck.h - -libmonoutilsincludedir = $(includedir)/mono-$(API_VER)/mono/utils - -libmonoutilsinclude_HEADERS = \ monobitset.h \ mono-codeman.h \ mono-counters.h \ @@ -87,6 +82,13 @@ libmonoutilsinclude_HEADERS = \ mono-path.h \ mono-poll.h \ mono-uri.h \ - mono-stdlib.h + mono-stdlib.h \ + valgrind.h \ + memcheck.h + +libmonoutilsincludedir = $(includedir)/mono-$(API_VER)/mono/utils + +libmonoutilsinclude_HEADERS = \ + mono-publib.h EXTRA_DIST = ChangeLog mono-hash.c mono-hash.h mono-ehash.c diff --git a/mono/utils/mono-publib.c b/mono/utils/mono-publib.c new file mode 100644 index 00000000000..70271a57f8f --- /dev/null +++ b/mono/utils/mono-publib.c @@ -0,0 +1,10 @@ +#include "config.h" +#include +#include + +void +mono_free (void *ptr) +{ + g_free (ptr); +} + diff --git a/mono/utils/mono-publib.h b/mono/utils/mono-publib.h new file mode 100644 index 00000000000..b5424924119 --- /dev/null +++ b/mono/utils/mono-publib.h @@ -0,0 +1,51 @@ +#ifndef __MONO_PUBLIB_H__ +#define __MONO_PUBLIB_H__ + +/* + * Minimal general purpose header for use in public mono header files. + * We can't include config.h, so we use compiler-specific preprocessor + * directives where needed. + */ + +#ifdef __cplusplus +#define MONO_BEGIN_DECLS extern "C" { +#define MONO_END_DECLS } +#else +#define MONO_BEGIN_DECLS +#define MONO_END_DECLS +#endif + +MONO_BEGIN_DECLS + +#if defined(_MSC_VER) + +typedef __int8 int8_t; +typedef unsigned __int8 uint8_t; +typedef __int16 int16_t; +typedef unsigned __int16 uint16_t; +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; + +#else + +#include + +#endif /* end of compiler-specific stuff */ + +typedef int32_t mono_bool; +typedef uint8_t mono_byte; +typedef uint16_t mono_unichar2; + +typedef void (*MonoFunc) (void* data, void* user_data); +typedef void (*MonoHFunc) (void* key, void* value, void* user_data); + +void mono_free (void *); + +#define MONO_CONST_RETURN const + +MONO_END_DECLS + +#endif /* __MONO_PUBLIB_H__ */ + -- 2.25.1