From 5b113f3ee3bc0f3e476535f39d9c3b4562242976 Mon Sep 17 00:00:00 2001 From: grischka Date: Fri, 13 Nov 2009 17:14:05 +0100 Subject: win32: handle __declspec(dllimport) --- tcc.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index bf242e5..61164d4 100644 --- a/tcc.h +++ b/tcc.h @@ -276,11 +276,13 @@ typedef struct { unsigned func_call : 8, func_args : 8, - func_export : 1; + func_export : 1, + func_import : 1; } func_attr_t; #define FUNC_CALL(r) (((func_attr_t*)&(r))->func_call) #define FUNC_EXPORT(r) (((func_attr_t*)&(r))->func_export) +#define FUNC_IMPORT(r) (((func_attr_t*)&(r))->func_import) #define FUNC_ARGS(r) (((func_attr_t*)&(r))->func_args) /* -------------------------------------------------- */ @@ -570,11 +572,12 @@ struct TCCState { #define VT_STATIC 0x00000100 /* static variable */ #define VT_TYPEDEF 0x00000200 /* typedef definition */ #define VT_INLINE 0x00000400 /* inline definition */ +#define VT_IMPORT 0x00004000 /* win32: extern data imported from dll */ #define VT_STRUCT_SHIFT 16 /* shift for bitfield shift values */ /* type mask (except storage) */ -#define VT_STORAGE (VT_EXTERN | VT_STATIC | VT_TYPEDEF | VT_INLINE) +#define VT_STORAGE (VT_EXTERN | VT_STATIC | VT_TYPEDEF | VT_INLINE | VT_IMPORT) #define VT_TYPE (~(VT_STORAGE)) /* token values */ -- cgit v1.3.1