// Authors:
// Sebastien Pouliot <sebastien@xamarin.com>
//
-// Copyright 2012-2013 Xamarin Inc. All rights reserved.
+// Copyright 2012-2014 Xamarin Inc. All rights reserved.
//
#if FULL_AOT_RUNTIME
extern static void monotouch_log (string s);
[DllImport ("/usr/lib/libSystem.dylib")]
- extern static int write (int fd, byte [] buffer, int n);
+ extern static /* ssize_t */ IntPtr write (int fd, byte [] buffer, /* size_t */ IntPtr n);
StringBuilder sb;
static void direct_write_to_stdout (string s)
{
byte [] b = Encoding.Default.GetBytes (s);
- while (write (1, b, b.Length) == -1 && Marshal.GetLastWin32Error () == /* EINTR*/ 4)
+ var len = (IntPtr) b.Length;
+ while ((int) write (1, b, len) == -1 && Marshal.GetLastWin32Error () == /* EINTR*/ 4)
;
}