1
0
mirror of https://github.com/golang/go synced 2024-11-22 22:10:03 -07:00

misc/cgo/testsovar: needs the extern keyword to export variables on non-windows platforms

Change-Id: I87fa25214fbf24469148a63f4e1e61e261105c16
Reviewed-on: https://go-review.googlesource.com/12470
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Ingo Krabbe 2015-07-21 12:49:59 +02:00 committed by Ian Lance Taylor
parent e9fcd6ed2b
commit 2e38b3511a

View File

@ -11,7 +11,7 @@
# define VAR __declspec(dllimport)
#endif
#else
# define VAR
# define VAR extern
#endif
VAR const char *exported_var;