Author: marek
Date: 2008-01-23 04:40:28 -0500 (Wed, 23 Jan 2008)
New Revision: 93632

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/codegen.cs
Log:
2008-01-23  Marek Safar  <[EMAIL PROTECTED]>

        * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
        


Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2008-01-23 09:32:37 UTC (rev 93631)
+++ trunk/mcs/mcs/ChangeLog     2008-01-23 09:40:28 UTC (rev 93632)
@@ -1,3 +1,7 @@
+2008-01-23  Marek Safar  <[EMAIL PROTECTED]>
+
+       * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
+
 2008-01-22  Marek Safar  <[EMAIL PROTECTED]>
 
        * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool 
conversion is

Modified: trunk/mcs/mcs/codegen.cs
===================================================================
--- trunk/mcs/mcs/codegen.cs    2008-01-23 09:32:37 UTC (rev 93631)
+++ trunk/mcs/mcs/codegen.cs    2008-01-23 09:40:28 UTC (rev 93632)
@@ -106,9 +106,6 @@
                //
                static public bool Init (string name, string output, bool 
want_debugging_support)
                {
-                       /* Keep this in sync with 
System.Reflection.Emit.AssemblyBuilder */
-                       const AssemblyBuilderAccess COMPILER_ACCESS = 
(AssemblyBuilderAccess) 0x800;
-
                        FileName = output;
                        AssemblyName an = Assembly.GetAssemblyName (name, 
output);
                        if (an == null)
@@ -133,6 +130,13 @@
                        current_domain = AppDomain.CurrentDomain;
 
                        try {
+#if MS_COMPATIBLE
+                               const AssemblyBuilderAccess COMPILER_ACCESS = 0;
+#else
+                               /* Keep this in sync with 
System.Reflection.Emit.AssemblyBuilder */
+                               const AssemblyBuilderAccess COMPILER_ACCESS = 
(AssemblyBuilderAccess) 0x800;
+#endif
+                               
                                Assembly.Builder = 
current_domain.DefineDynamicAssembly (an,
                                        AssemblyBuilderAccess.Save | 
COMPILER_ACCESS, Dirname (name));
                        }
@@ -143,7 +147,7 @@
                                                
RootContext.StrongNameKeyContainer + "'.");
                                        Environment.Exit (1);
                                }
-                               return false;
+                               throw;
                        }
                        catch (CryptographicException) {
                                if ((RootContext.StrongNameKeyContainer != 
null) || (RootContext.StrongNameKeyFile != null)) {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to