X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fmono-io-portability.c;h=979bb6037fd21ba9be040c408eca9cba4a265fe2;hb=1d63c5debc23167e6310700cefbdb22813c32acf;hp=839b9b3d14ee1a0bf8444f92fc725944c0ce57a3;hpb=8ef4e4703172fd32ada3f74b22df5203b4683493;p=mono.git diff --git a/mono/utils/mono-io-portability.c b/mono/utils/mono-io-portability.c index 839b9b3d14e..979bb6037fd 100644 --- a/mono/utils/mono-io-portability.c +++ b/mono/utils/mono-io-portability.c @@ -10,27 +10,11 @@ #include #include #include -#include #include #include #include -#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 @@ -115,7 +99,7 @@ static gchar *find_in_dir (DIR *current, const gchar *name) 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 (""); @@ -148,7 +132,11 @@ static inline void do_mono_profiler_iomap (GString **report, const char *pathnam 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);