From 7fa712e00c5221d9373e8f8fa073e9e6fa064da1 Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 19 Dec 2009 22:22:43 +0100 Subject: win32: enable bounds checker & exception handler exception handler borrowed from k1w1. Thanks. --- tcc.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index cc63e92..16aba53 100644 --- a/tcc.h +++ b/tcc.h @@ -101,7 +101,7 @@ #define TCC_TARGET_I386 #endif -#if !defined(_WIN32) && !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \ +#if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \ !defined(TCC_TARGET_C67) && !defined(TCC_TARGET_X86_64) #define CONFIG_TCC_BCHECK /* enable bound checking code */ #endif @@ -120,7 +120,7 @@ #define TCC_TARGET_COFF #endif -#if !defined(_WIN32) && !defined(CONFIG_TCCBOOT) +#if !defined(CONFIG_TCCBOOT) #define CONFIG_TCC_BACKTRACE #endif @@ -465,8 +465,10 @@ struct TCCState { int verbose; /* compile with debug symbol (and use them if error during execution) */ int do_debug; +#ifdef CONFIG_TCC_BCHECK /* compile with built-in memory and bounds checker */ int do_bounds_check; +#endif /* give the path of the tcc libraries */ char *tcc_lib_path; @@ -809,11 +811,6 @@ char *pstrcat(char *buf, int buf_size, const char *s); void dynarray_add(void ***ptab, int *nb_ptr, void *data); void dynarray_reset(void *pp, int *n); -#ifdef CONFIG_TCC_BACKTRACE -extern int num_callers; -extern const char **rt_bound_error_msg; -#endif - /* true if float/double/long double type */ static inline int is_float(int t) { -- cgit v1.3.1