Fix for Microsoft compilers
Miccrosoft Visual Sudio (Express) 2008 and 2010 do not accept variable
definitions C99 style, reported by Fabio <oldfaber@gmail.com>
This commit is contained in:
@ -81,7 +81,7 @@ void __bound_new_region(void *p, size_t size);
|
|||||||
int __bound_delete_region(void *p);
|
int __bound_delete_region(void *p);
|
||||||
|
|
||||||
#ifdef __attribute__
|
#ifdef __attribute__
|
||||||
/* __attribute__ is redifened in system headers */
|
/* an __attribute__ macro is defined in the system headers */
|
||||||
#undef __attribute__
|
#undef __attribute__
|
||||||
#endif
|
#endif
|
||||||
#define FASTCALL __attribute__((regparm(3)))
|
#define FASTCALL __attribute__((regparm(3)))
|
||||||
|
|||||||
2
libtcc.c
2
libtcc.c
@ -462,8 +462,8 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
|
|||||||
if (!sym->c) {
|
if (!sym->c) {
|
||||||
name = get_tok_str(sym->v, NULL);
|
name = get_tok_str(sym->v, NULL);
|
||||||
#ifdef CONFIG_TCC_BCHECK
|
#ifdef CONFIG_TCC_BCHECK
|
||||||
char buf[32];
|
|
||||||
if (tcc_state->do_bounds_check) {
|
if (tcc_state->do_bounds_check) {
|
||||||
|
char buf[32];
|
||||||
/* XXX: avoid doing that for statics ? */
|
/* XXX: avoid doing that for statics ? */
|
||||||
/* if bound checking is activated, we change some function
|
/* if bound checking is activated, we change some function
|
||||||
names by adding the "__bound" prefix */
|
names by adding the "__bound" prefix */
|
||||||
|
|||||||
Reference in New Issue
Block a user