2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Tue, 29 Mar 2005 18:16:10 +0000 (18:16 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Tue, 29 Mar 2005 18:16:10 +0000 (18:16 -0000)
* monograph.c: Add mono-compiler.h header to allow/ease compilation
with non-GCC compilers. Fix default loading of mscorlib.dll.

svn path=/trunk/mono/; revision=42349

mono/monograph/ChangeLog
mono/monograph/monograph.c

index 172ae827d0b6113d41c58254de1f932030b27007..9e78f13fae262469384fecc1c0d01545d6463a76 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * monograph.c: Add mono-compiler.h header to allow/ease compilation
+       with non-GCC compilers. Fix default loading of mscorlib.dll.
+
 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
 
        * monograph.c (print_method): Don't use method->info, as this will
index 61615bc3ab997420e74d1daf4d029b93f11ccd10..7fb66c17e04372ed6c9a244c401d79fbab51d77b 100644 (file)
@@ -8,6 +8,7 @@
 #include "mono/metadata/mono-endian.h"
 #include "mono/metadata/appdomain.h" /* mono_init */
 #include "mono/metadata/debug-helpers.h"
+#include "mono/utils/mono-compiler.h"
 
 static FILE *output;
 static int include_namespace = 0;
@@ -1050,12 +1051,14 @@ main (int argc, char *argv[]) {
                aname = argv [i];
        if (argc > i + 1)
                cname = argv [i + 1];
-       if (!aname)
-               aname = "mscorlib";
+       if (aname) {
+               assembly = mono_assembly_open (aname, NULL);
+       } else {
+               assembly = mono_image_get_assembly (mono_get_corlib ());
+       }
        if (!cname && (graphtype == GRAPH_TYPES))
                cname = "System.Object";
 
-       assembly = mono_assembly_open (aname, NULL);
        if (!assembly) {
                g_print ("cannot open assembly %s\n", aname);
                exit (1);