* io-portability.c Do not initialize portability helpers here, it's done in
mono_runtime_init.
2007-09-12 Marek Habersack <mhabersack@novell.com>
* appdomain.c (mono_runtime_init): init portability helpers here.
svn path=/trunk/mono/; revision=85682
* io-portability.c: options_init moved to
utils/mono-io-portability.c
+ Do not initialize portability helpers here, it's done in
+ mono_runtime_init.
2007-09-09 Robert Jordan <robertj@gmx.net>
int num_components = 0, component = 0;
DIR *scanning = NULL;
- mono_portability_helpers_init ();
-
if (IS_PORTABILITY_NONE) {
return(NULL);
}
{
gchar *new_filename = g_strdup (filename), *ret;
- mono_portability_helpers_init ();
-
g_strdelimit (new_filename, "\\", '/');
if (IS_PORTABILITY_DRIVE &&
{
gchar *new_filename = g_strdup (filename), *ret;
- mono_portability_helpers_init ();
-
g_strdelimit (new_filename, "\\", '/');
if (IS_PORTABILITY_DRIVE &&
trigger the AppDomain.AssemblyResolve event.
(mono_try_assembly_resolve): renamed from try_assembly_resolve and
made non-static.
+ (mono_runtime_init): init portability helpers here.
* assembly.c (mono_assembly_load_with_partial_name): if other
attempts fail, trigger the AppDomain.AssemblyResolve event handler
#include <mono/utils/mono-logger.h>
#include <mono/utils/mono-path.h>
#include <mono/utils/mono-stdlib.h>
+#include <mono/utils/mono-io-portability.h>
#ifdef PLATFORM_WIN32
#include <direct.h>
#endif
MonoAppDomain *ad;
MonoClass *class;
MonoString *arg;
+
+ mono_portability_helpers_init ();
MONO_GC_PRE_INIT ();
mono_monitor_init ();
/* mscorlib is loaded before we install the load hook */
mono_domain_fire_assembly_load (mono_defaults.corlib->assembly, NULL);
-
+
return;
}
#include "config.h"
#include <glib.h>
-#include <mono/io-layer/mono-mutex.h>
#include <mono/utils/mono-io-portability.h>
-static mono_once_t options_once = MONO_ONCE_INIT;
int __mono_io_portability_helpers = PORTABILITY_UNKNOWN;
-static void options_init (void)
+void mono_portability_helpers_init (void)
{
const gchar *env;
-
+
+ if (__mono_io_portability_helpers != PORTABILITY_UNKNOWN)
+ return;
+
__mono_io_portability_helpers = PORTABILITY_NONE;
env = g_getenv ("MONO_IOMAP");
}
}
}
-
-void mono_portability_helpers_init ()
-{
- mono_once (&options_once, options_init);
-}
-
-#ifndef __MONO_URI_H
-#define __MONO_URI_H
+#ifndef __MONO_IO_PORTABILITY_H
+#define __MONO_IO_PORTABILITY_H
#include <mono/utils/mono-compiler.h>