diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-30 17:54:32 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-11-02 06:59:44 +0000 |
commit | 2fe8708a47ea47ae709f7fc432e28caff6e649f0 (patch) | |
tree | e9b4f6b0b70d70ea1a32299d7488cb4801a4388d /sources/shiboken6/tests/libminimal | |
parent | 4a93787a78fac4a3cf0942247281e68bd86f47e9 (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/libminimal')
-rw-r--r-- | sources/shiboken6/tests/libminimal/libminimalmacros.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/sources/shiboken6/tests/libminimal/libminimalmacros.h b/sources/shiboken6/tests/libminimal/libminimalmacros.h index a9c417624..99ff667db 100644 --- a/sources/shiboken6/tests/libminimal/libminimalmacros.h +++ b/sources/shiboken6/tests/libminimal/libminimalmacros.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,22 @@ #ifndef LIBMINIMALMACROS_H #define LIBMINIMALMACROS_H -#if defined _WIN32 || defined __CYGWIN__ - #if LIBMINIMAL_BUILD - #define LIBMINIMAL_API __declspec(dllexport) - #else - #define LIBMINIMAL_API __declspec(dllimport) - #endif +#if defined _WIN32 +# define LIBMINIMAL_EXPORT __declspec(dllexport) +# ifdef _MSC_VER +# define LIBMINIMAL_IMPORT __declspec(dllimport) +# else +# define LIBMINIMAL_IMPORT +# endif #else -#if __GNUC__ >= 4 - #define LIBMINIMAL_API __attribute__ ((visibility("default"))) -#else - #define LIBMINIMAL_API -#endif +# define LIBMINIMAL_EXPORT __attribute__ ((visibility("default"))) +# define LIBMINIMAL_IMPORT #endif +#ifdef LIBMINIMAL_BUILD +# define LIBMINIMAL_API LIBMINIMAL_EXPORT +#else +# define LIBMINIMAL_API LIBMINIMAL_IMPORT #endif + +#endif // LIBMINIMALMACROS_H |