2 * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
11 #include "native_client/src/include/nacl_assert.h"
12 #include "native_client/src/untrusted/nacl/nacl_irt.h"
14 static struct nacl_irt_fdio g_fdio;
16 void init_error_report_module(void) {
17 size_t bytes = nacl_interface_query(NACL_IRT_FDIO_v0_1,
18 &g_fdio, sizeof(g_fdio));
19 ASSERT_EQ(bytes, sizeof(g_fdio));
22 void irt_ext_test_print(const char *format, ...) {
28 va_start (args, format);
29 bufferlen = vsnprintf(buffer, sizeof(buffer) - 1, format, args);
33 int ret = g_fdio.write(STDERR_FILENO, buffer, bufferlen, &nwrote);
34 if (ret != 0 || nwrote != bufferlen) {