From: Jonathan Pryor Date: Tue, 21 May 2013 00:34:50 +0000 (-0400) Subject: [Mono.Posix] Fix INTL.DLL CallingConvention. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=377f6a6ce8f9c520ac5c2247fbfc5768e2b70c0d;p=mono.git [Mono.Posix] Fix INTL.DLL CallingConvention. INTL.DLL on Windows uses the `__cdecl` calling convention. Let's not corrupt the stack on Windows... --- diff --git a/mcs/class/Mono.Posix/Mono.Unix/Catalog.cs b/mcs/class/Mono.Posix/Mono.Unix/Catalog.cs index d835fec4624..90bddb0fbf4 100644 --- a/mcs/class/Mono.Posix/Mono.Unix/Catalog.cs +++ b/mcs/class/Mono.Posix/Mono.Unix/Catalog.cs @@ -40,12 +40,12 @@ namespace Mono.Unix { public class Catalog { private Catalog () {} - [DllImport("intl")] + [DllImport("intl", CallingConvention=CallingConvention.Cdecl)] static extern IntPtr bindtextdomain (IntPtr domainname, IntPtr dirname); - [DllImport("intl")] + [DllImport("intl", CallingConvention=CallingConvention.Cdecl)] static extern IntPtr bind_textdomain_codeset (IntPtr domainname, IntPtr codeset); - [DllImport("intl")] + [DllImport("intl", CallingConvention=CallingConvention.Cdecl)] static extern IntPtr textdomain (IntPtr domainname); public static void Init (String package, String localedir) @@ -91,7 +91,7 @@ namespace Mono.Unix { } } - [DllImport("intl")] + [DllImport("intl", CallingConvention=CallingConvention.Cdecl)] static extern IntPtr gettext (IntPtr instring); public static String GetString (String s) @@ -109,7 +109,7 @@ namespace Mono.Unix { } } - [DllImport("intl")] + [DllImport("intl", CallingConvention=CallingConvention.Cdecl)] static extern IntPtr ngettext (IntPtr singular, IntPtr plural, Int32 n); public static String GetPluralString (String s, String p, Int32 n)