Skip to content

Commit

Permalink
C: minor fixes for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
konsoletyper committed Sep 7, 2019
1 parent a53f59e commit 5643e82
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/main/resources/org/teavm/backend/c/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
#include "memory.h"
#include "exceptions.h"

#if TEAVM_MEMORY_TRACE
#include "heaptrace.h"
#include <stdlib.h>
#endif

typedef struct TeaVM_Object {
int32_t header;
int32_t hash;
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/org/teavm/backend/c/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#ifdef __GNUC__
#undef TEAVM_UNIX
#define TEAVM_UNIX 1
#include <stdalign.h>
#endif

#ifndef TEAVM_USE_SETJMP
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/org/teavm/backend/c/exceptions.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once
#include "definitions.h"
#include <stdint.h>
#include <stddef.h>

#if TEAVM_USE_SETJMP
#include <setjmp.h>
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/org/teavm/backend/c/heaptrace.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "heaptrace.h"
#include "core.h"
#include "definitions.h"
#include "memory.h"
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/resources/org/teavm/backend/c/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#include <Windows.h>
#endif

#if TEAVM_MEMORY_TRACE
#include "heaptrace.h"
#endif

void* teavm_gc_heapAddress = NULL;
void* teavm_gc_gcStorageAddress = NULL;
int32_t teavm_gc_gcStorageSize = INT32_C(0);
Expand Down

0 comments on commit 5643e82

Please sign in to comment.