You've already forked linux-packaging-mono
Imported Upstream version 4.0.5.1
Former-commit-id: d28a93322098597c784fac59bbd2f5ec23edc4ab
This commit is contained in:
@@ -811,11 +811,11 @@ gboolean CreateProcess (const gunichar2 *appname, const gunichar2 *cmdline,
|
||||
|
||||
if (newapp != NULL) {
|
||||
if (appname != NULL) {
|
||||
newcmd = utf16_concat (newapp, utf16_space,
|
||||
newcmd = utf16_concat (utf16_quote, newapp, utf16_quote, utf16_space,
|
||||
appname, utf16_space,
|
||||
cmdline, NULL);
|
||||
} else {
|
||||
newcmd = utf16_concat (newapp, utf16_space,
|
||||
newcmd = utf16_concat (utf16_quote, newapp, utf16_quote, utf16_space,
|
||||
cmdline, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <mono/utils/mono-counters.h>
|
||||
#include <mono/utils/mono-error-internals.h>
|
||||
#include <mono/utils/mono-tls.h>
|
||||
#include <mono/utils/mono-path.h>
|
||||
|
||||
MonoDefaults mono_defaults;
|
||||
|
||||
@@ -1420,7 +1421,7 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
|
||||
const char *new_scope;
|
||||
char *error_msg;
|
||||
char *full_name, *file_name, *found_name = NULL;
|
||||
int i;
|
||||
int i,j;
|
||||
MonoDl *module = NULL;
|
||||
gboolean cached = FALSE;
|
||||
|
||||
@@ -1568,23 +1569,85 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
|
||||
}
|
||||
|
||||
if (!module && !is_absolute) {
|
||||
void *iter = NULL;
|
||||
char *mdirname = g_path_get_dirname (image->name);
|
||||
while ((full_name = mono_dl_build_path (mdirname, file_name, &iter))) {
|
||||
module = cached_module_load (full_name, MONO_DL_LAZY, &error_msg);
|
||||
if (!module) {
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
|
||||
"DllImport error loading library '%s': '%s'.",
|
||||
full_name, error_msg);
|
||||
g_free (error_msg);
|
||||
} else {
|
||||
found_name = g_strdup (full_name);
|
||||
void *iter;
|
||||
char *mdirname;
|
||||
|
||||
for (j = 0; j < 3; ++j) {
|
||||
iter = NULL;
|
||||
mdirname = NULL;
|
||||
switch (j) {
|
||||
case 0:
|
||||
mdirname = g_path_get_dirname (image->name);
|
||||
break;
|
||||
case 1: /* @executable_path@/../lib */
|
||||
{
|
||||
char buf [4096];
|
||||
int binl;
|
||||
binl = mono_dl_get_executable_path (buf, sizeof (buf));
|
||||
if (binl != -1) {
|
||||
char *base, *newbase;
|
||||
char *resolvedname;
|
||||
buf [binl] = 0;
|
||||
resolvedname = mono_path_resolve_symlinks (buf);
|
||||
|
||||
base = g_path_get_dirname (resolvedname);
|
||||
newbase = g_path_get_dirname(base);
|
||||
mdirname = g_strdup_printf ("%s/lib", newbase);
|
||||
|
||||
g_free (resolvedname);
|
||||
g_free (base);
|
||||
g_free (newbase);
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifdef __MACH__
|
||||
case 2: /* @executable_path@/../Libraries */
|
||||
{
|
||||
char buf [4096];
|
||||
int binl;
|
||||
binl = mono_dl_get_executable_path (buf, sizeof (buf));
|
||||
if (binl != -1) {
|
||||
char *base, *newbase;
|
||||
char *resolvedname;
|
||||
buf [binl] = 0;
|
||||
resolvedname = mono_path_resolve_symlinks (buf);
|
||||
|
||||
base = g_path_get_dirname (resolvedname);
|
||||
newbase = g_path_get_dirname(base);
|
||||
mdirname = g_strdup_printf ("%s/Libraries", newbase);
|
||||
|
||||
g_free (resolvedname);
|
||||
g_free (base);
|
||||
g_free (newbase);
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
g_free (full_name);
|
||||
|
||||
if (!mdirname)
|
||||
continue;
|
||||
|
||||
while ((full_name = mono_dl_build_path (mdirname, file_name, &iter))) {
|
||||
module = cached_module_load (full_name, MONO_DL_LAZY, &error_msg);
|
||||
if (!module) {
|
||||
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
|
||||
"DllImport error loading library '%s': '%s'.",
|
||||
full_name, error_msg);
|
||||
g_free (error_msg);
|
||||
} else {
|
||||
found_name = g_strdup (full_name);
|
||||
}
|
||||
g_free (full_name);
|
||||
if (module)
|
||||
break;
|
||||
|
||||
}
|
||||
g_free (mdirname);
|
||||
if (module)
|
||||
break;
|
||||
}
|
||||
g_free (mdirname);
|
||||
|
||||
}
|
||||
|
||||
if (!module) {
|
||||
|
||||
@@ -759,7 +759,7 @@ EXTRA_DIST = TestDriver.cs ldscript ldscript.mono \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.0.4.1/5ab4c0d\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.0.5.1/1d8d582\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
||||
@@ -759,7 +759,7 @@ EXTRA_DIST = TestDriver.cs ldscript ldscript.mono \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.0.4.1/5ab4c0d\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.0.5.1/1d8d582\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
||||
@@ -1 +1 @@
|
||||
8959e291e0e5f26397d9b96d257b52820f9acee0
|
||||
5804298b3a62c2db5b469e57d8236ad19d9cb527
|
||||
@@ -1 +1 @@
|
||||
#define FULL_VERSION "Stable 4.0.4.1/5ab4c0d"
|
||||
#define FULL_VERSION "Stable 4.0.5.1/1d8d582"
|
||||
|
||||
Reference in New Issue
Block a user