aboutsummaryrefslogtreecommitdiff
path: root/system/lib/debugging.cpp
blob: ff9e0d6895e38da4efd463ee83b25c70a1345c46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Some stuff to patch up an emscripten-sdk build so it can be built natively (see nativize_llvm)

#include <stdio.h>
#include <stdlib.h>

extern "C" {

int *__errno()
{
  static int e = 0;
  return &e;
}

void __assert_func(const char *file, int line, const char *assertt, const char *cond)
{
  printf("assert-func: %s : %d : %s : %s\n", file, line, assertt, cond);
  abort();
}

}