diff options
author | wszqkzqk <wszqkzqk@qq.com> | 2023-01-11 13:44:34 +0800 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-01-11 09:37:37 +0100 |
commit | 1b63836ba222440affcde4f3036c68f009dabc2c (patch) | |
tree | ec5d4faf264775b086bfe9f1f60b617ab23e9001 | |
parent | f82f63c58128be1dbba03bb4991f6fb55892a85d (diff) | |
download | vala-1b63836ba222440affcde4f3036c68f009dabc2c.tar.gz |
codegen: Improve handling of 'extern' on Win32 and Cygwin
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1398
-rw-r--r-- | codegen/valaccodebasemodule.vala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index 13759dec4..5d765c314 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -826,7 +826,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { var extern_define = new CCodeIfSection ("!defined(VALA_EXTERN)"); CCodeIfSection if_section; - if_section = new CCodeIfSection ("defined(_MSC_VER)"); + if_section = new CCodeIfSection ("defined(_WIN32) || defined(__CYGWIN__)"); extern_define.append (if_section); if_section.append (new CCodeDefine ("VALA_EXTERN", "__declspec(dllexport) extern")); if_section = if_section.append_else ("__GNUC__ >= 4"); |