Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions mono/eglib/ghashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,6 @@ g_hash_table_lookup_extended (GHashTable *hash, gconstpointer key, gpointer *ori
}
return FALSE;
}
#ifdef G_OS_WIN32

#define OFFSET_MEMBER(type, base, member) ((gpointer)((gchar*)(base) + offsetof(type, member)))

gpointer
Expand Down Expand Up @@ -377,8 +375,6 @@ g_hash_table_lookup_oop(GHashTable* hash, gconstpointer key, GReadPointerFunc re
return NULL;
}

#endif

void
g_hash_table_foreach (GHashTable *hash, GHFunc func, gpointer user_data)
{
Expand Down
4 changes: 0 additions & 4 deletions mono/eglib/glib.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,9 @@ typedef void (*GDestroyNotify) (gpointer data);
typedef guint (*GHashFunc) (gconstpointer key);
typedef gboolean (*GEqualFunc) (gconstpointer a, gconstpointer b);
typedef void (*GFreeFunc) (gpointer data);
#ifdef G_OS_WIN32
/* oop support*/
typedef gpointer (*GReadPointerFunc)(gconstpointer address);
typedef guint32 (*GReadUInt32Func) (gconstpointer address);
#endif

/*
* Lists
Expand Down Expand Up @@ -635,9 +633,7 @@ gboolean g_hash_table_contains (GHashTable *hash, gconstpointer key);
G_EXTERN_C // Used by MonoPosixHelper or MonoSupportW, at least.
gpointer g_hash_table_lookup (GHashTable *hash, gconstpointer key);
gboolean g_hash_table_lookup_extended (GHashTable *hash, gconstpointer key, gpointer *orig_key, gpointer *value);
#ifdef G_OS_WIN32
gpointer g_hash_table_lookup_oop (GHashTable* hash, gconstpointer key, GReadPointerFunc read_pointer, GReadUInt32Func read_uint32);
#endif
G_EXTERN_C // Used by MonoPosixHelper or MonoSupportW, at least.
void g_hash_table_foreach (GHashTable *hash, GHFunc func, gpointer user_data);
gpointer g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data);
Expand Down
1 change: 1 addition & 0 deletions mono/metadata/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ endif
common_sources = \
$(platform_sources) \
$(unity_sources) \
oop.c \
appdomain.c \
assembly-load-context.c \
domain.c \
Expand Down
13 changes: 13 additions & 0 deletions mono/metadata/oop.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@
#include <glib.h>
#include <string.h>
#include <sys/stat.h>
#include <stdio.h>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might not be needed


/* min/max macros for non-Windows platforms */
#ifndef _WIN32
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
/* Use snprintf instead of sprintf_s on non-Windows */
#define sprintf_s(buf, size, ...) snprintf(buf, size, __VA_ARGS__)
#endif

#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-logger.h>
Expand Down