From 0be098929a062d706057d7beb78666daa52bac49 Mon Sep 17 00:00:00 2001 From: grischka Date: Mon, 17 Oct 2016 23:24:01 +0200 Subject: tccpp_new/delete and other cleanups --- tccrun.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'tccrun.c') diff --git a/tccrun.c b/tccrun.c index 2fcecd9..6d31e2f 100644 --- a/tccrun.c +++ b/tccrun.c @@ -23,20 +23,28 @@ /* only native compiler supports -run */ #ifdef TCC_IS_NATIVE +#ifndef _WIN32 +# include +#endif + #ifdef CONFIG_TCC_BACKTRACE +# ifndef _WIN32 +# include +# ifndef __OpenBSD__ +# include +# endif +# else +# define ucontext_t CONTEXT +# endif ST_DATA int rt_num_callers = 6; ST_DATA const char **rt_bound_error_msg; ST_DATA void *rt_prog_main; -#endif - -#ifdef _WIN32 -#define ucontext_t CONTEXT +static int rt_get_caller_pc(addr_t *paddr, ucontext_t *uc, int level); +static void rt_error(ucontext_t *uc, const char *fmt, ...); +static void set_exception_handler(void); #endif static void set_pages_executable(void *ptr, unsigned long length); -static void set_exception_handler(void); -static int rt_get_caller_pc(addr_t *paddr, ucontext_t *uc, int level); -static void rt_error(ucontext_t *uc, const char *fmt, ...); static int tcc_relocate_ex(TCCState *s1, void *ptr); #ifdef _WIN64 -- cgit v1.3.1