[dia] Define DIAVAR (as empty) for *nix



commit 285133efe81016171815910829d824274bc91653
Author: Hans Breuer <hans breuer org>
Date:   Sun Dec 15 15:09:15 2013 +0100

    Define DIAVAR (as empty) for *nix
    
    fixing the build again after "Improve DIAVAR handling ..."

 lib/color.h  |    3 ++-
 lib/diavar.h |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/color.h b/lib/color.h
index a7b7723..daf36c4 100644
--- a/lib/color.h
+++ b/lib/color.h
@@ -44,7 +44,8 @@ gboolean color_equals(const Color *color1, const Color *color2);
 static Color color_black = { 0.0f, 0.0f, 0.0f, 1.0f };
 static Color color_white = { 1.0f, 1.0f, 1.0f, 1.0f };
 #else
-DIAVAR Color color_black, color_white;
+extern DIAVAR Color color_black;
+extern DIAVAR Color color_white;
 #endif
 
 #define DIA_COLOR_TO_GDK(from, to) \
diff --git a/lib/diavar.h b/lib/diavar.h
index a7f3b53..973506c 100644
--- a/lib/diavar.h
+++ b/lib/diavar.h
@@ -11,6 +11,7 @@
 #  endif /* !LIBDIA_COMPILATION */
 #else  /* !G_OS_WIN32 */
 #  /* DONT: define DIAVAR extern */
+#  define DIAVAR /* empty */
 #  /* extern and __declspec() are orthogonal - otherwise there wont be a difference between
 #   * the header declared variable and the one defined in the implmentation. At least clang-cl
 #   * code generation would create mutliple definitions, which later prohibit linking.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]