Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Taylor <elijahtaylor@google.com>2013-02-01 00:04:20 +0400
committerZoltan Varga <vargaz@gmail.com>2013-04-07 11:45:45 +0400
commit1e726ce7a38a92860acab28f4427813d2ba14c13 (patch)
treee832165ae65eab2a49361b4a50509e71214bb4b8 /libgc/misc.c
parent28c53a39a4630ecb719a94ee6dd6801633799a89 (diff)
NaCl runtime fixes
- fix compile/runtime issues caused by upstream changes - add NaCl glibc support - various changes to support running tests in NaCl glibc from 'make check'
Diffstat (limited to 'libgc/misc.c')
-rw-r--r--libgc/misc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libgc/misc.c b/libgc/misc.c
index 5b2868d808b..53d47c53dbc 100644
--- a/libgc/misc.c
+++ b/libgc/misc.c
@@ -1003,7 +1003,11 @@ long a, b, c, d, e, f;
buf[1024] = 0x15;
(void) sprintf(buf, format, a, b, c, d, e, f);
if (buf[1024] != 0x15) ABORT("GC_printf clobbered stack");
+#ifdef NACL
+ WRITE(GC_stdout, buf, strlen(buf));
+#else
if (WRITE(GC_stdout, buf, strlen(buf)) < 0) ABORT("write to stdout failed");
+#endif
}
void GC_err_printf(format, a, b, c, d, e, f)
@@ -1015,13 +1019,21 @@ long a, b, c, d, e, f;
buf[1024] = 0x15;
(void) sprintf(buf, format, a, b, c, d, e, f);
if (buf[1024] != 0x15) ABORT("GC_err_printf clobbered stack");
+#ifdef NACL
+ WRITE(GC_stderr, buf, strlen(buf));
+#else
if (WRITE(GC_stderr, buf, strlen(buf)) < 0) ABORT("write to stderr failed");
+#endif
}
void GC_err_puts(s)
GC_CONST char *s;
{
+#ifdef NACL
+ WRITE(GC_stderr, s, strlen(s));
+#else
if (WRITE(GC_stderr, s, strlen(s)) < 0) ABORT("write to stderr failed");
+#endif
}
#if defined(LINUX) && !defined(SMALL_CONFIG)