aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorgrischka <grischka>2009-12-19 22:08:52 +0100
committergrischka <grischka>2009-12-19 22:16:21 +0100
commit94bf4d2c227e2073458cabc768d1167e1f3ab2f8 (patch)
treec18160b09f29b7a3dddbdb10756edb1526d98f4e /tccgen.c
parent1308e8ebcfba43b4b96b7ef32f1a177b1168665d (diff)
downloadtinycc-94bf4d2c227e2073458cabc768d1167e1f3ab2f8.tar.gz
tinycc-94bf4d2c227e2073458cabc768d1167e1f3ab2f8.tar.bz2
tccpe: improve dllimport
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tccgen.c b/tccgen.c
index 3c45646..7be1f22 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -5143,7 +5143,7 @@ static void decl(int l)
if (!(type.t & VT_ARRAY))
r |= lvalue_type(type.t);
has_init = (tok == '=');
- if ((btype.t & VT_EXTERN) ||
+ if ((btype.t & VT_EXTERN) ||
((type.t & VT_ARRAY) && (type.t & VT_STATIC) &&
!has_init && l == VT_CONST && type.ref->c < 0)) {
/* external variable */
@@ -5163,7 +5163,11 @@ static void decl(int l)
r |= l;
if (has_init)
next();
- decl_initializer_alloc(&type, &ad, r,
+#ifdef TCC_TARGET_PE
+ if (ad.func_export)
+ type.t |= VT_EXPORT;
+#endif
+ decl_initializer_alloc(&type, &ad, r,
has_init, v, l);
}
}