aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorgrischka <grischka>2009-11-13 17:14:05 +0100
committergrischka <grischka>2009-11-13 18:04:56 +0100
commit5b113f3ee3bc0f3e476535f39d9c3b4562242976 (patch)
tree765eb5a1a989a31799790667ccc9685136230ae1 /tcc.h
parentdd70d19267ac343adae7bf15fe15c08fa604e5e1 (diff)
downloadtinycc-5b113f3ee3bc0f3e476535f39d9c3b4562242976.tar.gz
tinycc-5b113f3ee3bc0f3e476535f39d9c3b4562242976.tar.bz2
win32: handle __declspec(dllimport)
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h7
1 files changed, 5 insertions, 2 deletions
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 */