#include <mono/metadata/class.h>
#include <mono/metadata/class-internals.h>
#include <mono/metadata/object.h>
-#include <mono/utils/mono-hash.h>
#include <mono/metadata/gc-internal.h>
#include <mono/metadata/profiler.h>
#include <mono/metadata/profiler-private.h>
-#ifdef DISABLE_PORTABILITY
-int __mono_io_portability_helpers = PORTABILITY_NONE;
-
-void
-mono_portability_helpers_init (void)
-{
-}
-
-gchar *
-mono_portability_find_file (const gchar *pathname, gboolean last_exists)
-{
- g_assert_not_reached();
- return NULL;
-}
-
-#else
+#ifndef DISABLE_PORTABILITY
#include <dirent.h>
static inline void append_report (GString **report, const gchar *format, ...)
{
-#if GLIB_CHECK_VERSION(2,14,0)
+#if defined (_EGLIB_MAJOR) || GLIB_CHECK_VERSION(2,14,0)
va_list ap;
if (!*report)
*report = g_string_new ("");
gchar *mono_portability_find_file (const gchar *pathname, gboolean last_exists)
{
GString *report = NULL;
- gchar *ret = mono_portability_find_file_internal (&report, pathname, last_exists);
+ gchar *ret;
+
+ if (!pathname || !pathname [0])
+ return NULL;
+ ret = mono_portability_find_file_internal (&report, pathname, last_exists);
if (report)
g_string_free (report, TRUE);