C: minor fixes for Linux

This commit is contained in:
Alexey Andreev 2019-09-07 22:08:32 +03:00
parent a53f59e147
commit 5643e82a3d
5 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,11 @@
#include "memory.h" #include "memory.h"
#include "exceptions.h" #include "exceptions.h"
#if TEAVM_MEMORY_TRACE
#include "heaptrace.h"
#include <stdlib.h>
#endif
typedef struct TeaVM_Object { typedef struct TeaVM_Object {
int32_t header; int32_t header;
int32_t hash; int32_t hash;

View File

@ -26,6 +26,7 @@
#ifdef __GNUC__ #ifdef __GNUC__
#undef TEAVM_UNIX #undef TEAVM_UNIX
#define TEAVM_UNIX 1 #define TEAVM_UNIX 1
#include <stdalign.h>
#endif #endif
#ifndef TEAVM_USE_SETJMP #ifndef TEAVM_USE_SETJMP

View File

@ -1,6 +1,7 @@
#pragma once #pragma once
#include "definitions.h" #include "definitions.h"
#include <stdint.h> #include <stdint.h>
#include <stddef.h>
#if TEAVM_USE_SETJMP #if TEAVM_USE_SETJMP
#include <setjmp.h> #include <setjmp.h>

View File

@ -1,6 +1,7 @@
#include "heaptrace.h" #include "heaptrace.h"
#include "core.h" #include "core.h"
#include "definitions.h" #include "definitions.h"
#include "memory.h"
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
#include <inttypes.h> #include <inttypes.h>

View File

@ -11,6 +11,10 @@
#include <Windows.h> #include <Windows.h>
#endif #endif
#if TEAVM_MEMORY_TRACE
#include "heaptrace.h"
#endif
void* teavm_gc_heapAddress = NULL; void* teavm_gc_heapAddress = NULL;
void* teavm_gc_gcStorageAddress = NULL; void* teavm_gc_gcStorageAddress = NULL;
int32_t teavm_gc_gcStorageSize = INT32_C(0); int32_t teavm_gc_gcStorageSize = INT32_C(0);