+/**
+ * \file
+ */
+
#include "config.h"
#include <string.h>
#include <errno.h>
#include <mono/utils/mono-io-portability.h>
#include <mono/metadata/profiler-private.h>
+#include <mono/utils/mono-compiler.h>
#ifndef DISABLE_PORTABILITY
void mono_portability_helpers_init (void)
{
- const gchar *env;
+ gchar *env;
if (mono_io_portability_helpers != PORTABILITY_UNKNOWN)
return;
mono_io_portability_helpers |= (PORTABILITY_DRIVE | PORTABILITY_CASE);
}
}
+ g_free (env);
}
}
static inline void append_report (GString **report, const gchar *format, ...)
{
-#if defined (_EGLIB_MAJOR) || GLIB_CHECK_VERSION(2,14,0)
va_list ap;
if (!*report)
*report = g_string_new ("");
va_start (ap, format);
g_string_append_vprintf (*report, format, ap);
va_end (ap);
-#else
- g_assert_not_reached ();
-#endif
}
static inline void do_mono_profiler_iomap (GString **report, const char *pathname, const char *new_pathname)
*report = NULL;
}
- mono_profiler_iomap (rep, pathname, new_pathname);
+ MONO_PROFILER_RAISE (iomap_report, (rep, pathname, new_pathname));
g_free (rep);
}
DIR *scanning = NULL;
size_t len;
gboolean drive_stripped = FALSE;
- gboolean do_report = (mono_profiler_get_events () & MONO_PROFILE_IOMAP_EVENTS) != 0;
+ gboolean do_report = MONO_PROFILER_ENABLED (iomap_report);
if (IS_PORTABILITY_NONE) {
return(NULL);
g_free (new_pathname);
return(NULL);
}
-#endif
+
+#else /* DISABLE_PORTABILITY */
+
+MONO_EMPTY_SOURCE_FILE (mono_io_portability);
+
+#endif /* DISABLE_PORTABILITY */