Skip to content

Commit

Permalink
[Mono.Posix] Fix INTL.DLL CallingConvention.
Browse files Browse the repository at this point in the history
INTL.DLL on Windows uses the `__cdecl` calling convention.

Let's not corrupt the stack on Windows...
  • Loading branch information
jonpryor committed May 21, 2013
1 parent bf9c7dc commit 377f6a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mcs/class/Mono.Posix/Mono.Unix/Catalog.cs
Expand Up @@ -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)
Expand Down Expand Up @@ -91,7 +91,7 @@ public static void Init (String package, String localedir)
}
}

[DllImport("intl")]
[DllImport("intl", CallingConvention=CallingConvention.Cdecl)]
static extern IntPtr gettext (IntPtr instring);

public static String GetString (String s)
Expand All @@ -109,7 +109,7 @@ public static String GetString (String s)
}
}

[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)
Expand Down

0 comments on commit 377f6a6

Please sign in to comment.