2016-05-30 17:12:53 +03:00
|
|
|
/********************************************************************************
|
2023-09-18 16:13:44 +02:00
|
|
|
* *
|
|
|
|
|
* This file is part of IfcOpenShell. *
|
|
|
|
|
* *
|
|
|
|
|
* IfcOpenShell is free software: you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the Lesser GNU General Public License as published by *
|
|
|
|
|
* the Free Software Foundation, either version 3.0 of the License, or *
|
|
|
|
|
* (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* IfcOpenShell 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 *
|
|
|
|
|
* Lesser GNU General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the Lesser GNU General Public License *
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
|
|
|
|
* *
|
|
|
|
|
********************************************************************************/
|
2016-05-30 17:12:53 +03:00
|
|
|
|
2016-07-20 22:49:32 +03:00
|
|
|
#ifndef IFC_PARSE_API_H
|
|
|
|
|
#define IFC_PARSE_API_H
|
2016-05-29 18:12:57 +06:00
|
|
|
|
2016-07-20 22:59:19 +03:00
|
|
|
#ifdef IFC_SHARED_BUILD
|
2023-09-17 12:30:17 +02:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
#ifdef IFC_PARSE_EXPORTS
|
|
|
|
|
#define IFC_PARSE_API __declspec(dllexport)
|
2016-05-30 00:59:06 +03:00
|
|
|
#else
|
2023-09-17 12:30:17 +02:00
|
|
|
#define IFC_PARSE_API __declspec(dllimport)
|
|
|
|
|
#endif
|
|
|
|
|
#else // simply assume *nix + GCC-like compiler
|
|
|
|
|
#define IFC_PARSE_API __attribute__((visibility("default")))
|
|
|
|
|
#endif
|
|
|
|
|
#else
|
|
|
|
|
#define IFC_PARSE_API
|
2016-05-29 18:12:57 +06:00
|
|
|
#endif
|
|
|
|
|
|
2022-06-06 09:59:32 +02:00
|
|
|
#if defined(__clang__)
|
2023-09-17 12:30:17 +02:00
|
|
|
#define my_thread_local thread_local
|
2022-06-06 09:59:32 +02:00
|
|
|
#elif defined(__GNUC__)
|
2023-09-17 12:30:17 +02:00
|
|
|
#define my_thread_local __thread
|
2022-06-06 09:59:32 +02:00
|
|
|
#elif __STDC_VERSION__ >= 201112L
|
2023-09-17 12:30:17 +02:00
|
|
|
#define my_thread_local _Thread_local
|
2022-06-06 09:59:32 +02:00
|
|
|
#elif defined(_MSC_VER)
|
2023-09-17 12:30:17 +02:00
|
|
|
#define my_thread_local __declspec(thread)
|
2022-06-06 09:59:32 +02:00
|
|
|
#elif defined(SWIG)
|
|
|
|
|
#else
|
2023-09-17 12:30:17 +02:00
|
|
|
#error Cannot define thread_local
|
2022-06-06 09:59:32 +02:00
|
|
|
#endif
|
|
|
|
|
|
2016-05-29 18:12:57 +06:00
|
|
|
#endif
|