aboutsummaryrefslogtreecommitdiffstats
path: root/generatorrunnermacros.h
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-11-17 11:44:00 -0200
committerHugo Lima <hugo.lima@openbossa.org>2009-11-17 11:44:00 -0200
commitf081e5ff270a23a2ae2dafede0520416f681ff4b (patch)
treedac5b04eeda86a32c6f3bc783dcf1fea75b53160 /generatorrunnermacros.h
parent4545d7fc24b016d6456da40298a2cf4581e38ec1 (diff)
Add symbol visibility rules to generator runner.
Diffstat (limited to 'generatorrunnermacros.h')
-rw-r--r--generatorrunnermacros.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/generatorrunnermacros.h b/generatorrunnermacros.h
new file mode 100644
index 00000000..f7095f18
--- /dev/null
+++ b/generatorrunnermacros.h
@@ -0,0 +1,42 @@
+/*
+* This file is part of the API Extractor project.
+*
+* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+*
+* Contact: PySide team <contact@pyside.org>
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* version 2 as published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it will be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA
+*
+*/
+
+#ifndef GENERATORRUNNERMACROS_H
+#define GENERATORRUNNERMACROS_H
+
+// GENRUNNER_API is used for the public API symbols.
+#if defined _WIN32 || defined __CYGWIN__
+ #if GENRUNNER_BUILD
+ #define GENRUNNER_API __declspec(dllimport)
+ #else
+ #define GENRUNNER_API __declspec(dllexport)
+ #endif
+#else
+ #if __GNUC__ >= 4
+ #define GENRUNNER_API __attribute__ ((visibility("default")))
+ #else
+ #define GENRUNNER_API
+ #endif
+#endif
+
+#endif