aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/libsamplemacros.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-30 17:54:32 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-02 06:59:44 +0000
commit2fe8708a47ea47ae709f7fc432e28caff6e649f0 (patch)
treee9b4f6b0b70d70ea1a32299d7488cb4801a4388d /sources/shiboken6/tests/libsample/libsamplemacros.h
parent4a93787a78fac4a3cf0942247281e68bd86f47e9 (diff)
shiboken6 tests: Consolidate import/export macrcos
Following 430d02db24b95a56ae0acc6a9df6a0effe49da0d, base them on libminimal. Change-Id: I722a73e6f45344cbc91fb044bdf1f015bdff5ec2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/tests/libsample/libsamplemacros.h')
-rw-r--r--sources/shiboken6/tests/libsample/libsamplemacros.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/sources/shiboken6/tests/libsample/libsamplemacros.h b/sources/shiboken6/tests/libsample/libsamplemacros.h
index cda029ab7..e85b0fd5b 100644
--- a/sources/shiboken6/tests/libsample/libsamplemacros.h
+++ b/sources/shiboken6/tests/libsample/libsamplemacros.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of Qt for Python.
@@ -29,18 +29,15 @@
#ifndef LIBSAMPLEMACROS_H
#define LIBSAMPLEMACROS_H
-#if defined _WIN32 || defined __CYGWIN__
- #if LIBSAMPLE_BUILD
- #define LIBSAMPLE_API __declspec(dllexport)
- #else
- #define LIBSAMPLE_API __declspec(dllimport)
- #endif
-#else
-#if __GNUC__ >= 4
- #define LIBSAMPLE_API __attribute__ ((visibility("default")))
+#include "../libminimal/libminimalmacros.h"
+
+#define LIBSAMPLE_EXPORT LIBMINIMAL_EXPORT
+#define LIBSAMPLE_IMPORT LIBMINIMAL_IMPORT
+
+#ifdef LIBSAMPLE_BUILD
+# define LIBSAMPLE_API LIBSAMPLE_EXPORT
#else
- #define LIBSAMPLE_API
-#endif
+# define LIBSAMPLE_API LIBSAMPLE_IMPORT
#endif
-#endif
+#endif // LIBSAMPLEMACROS_H