-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Specify the API interface properly
— 🛠 Fix bug in unreachable.h specification
- Loading branch information
Showing
13 changed files
with
254 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// ============================================================================= | ||
// | ||
// ztd.idk | ||
// Copyright © 2022 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: opensource@soasis.org | ||
// | ||
// Commercial License Usage | ||
// Licensees holding valid commercial ztd.idk licenses may use this file in | ||
// accordance with the commercial license agreement provided with the | ||
// Software or, alternatively, in accordance with the terms contained in | ||
// a written agreement between you and Shepherd's Oasis, LLC. | ||
// For licensing terms and conditions see your agreement. For | ||
// further information contact opensource@soasis.org. | ||
// | ||
// Apache License Version 2 Usage | ||
// Alternatively, this file may be used under the terms of Apache License | ||
// Version 2.0 (the "License") for non-commercial use; you may not use this | ||
// file except in compliance with the License. You may obtain a copy of the | ||
// License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ============================================================================ // | ||
|
||
#pragma once | ||
|
||
#ifndef ZTD_IDK_DETAIL_API_H | ||
#define ZTD_IDK_DETAIL_API_H | ||
|
||
#include <ztd/idk/version.h> | ||
|
||
// clang-format off | ||
|
||
#if defined(ZTD_IDK_BUILD) | ||
#if (ZTD_IDK_BUILD != 0) | ||
#define ZTD_IDK_BUILD_I_ ZTD_ON | ||
#else | ||
#define ZTD_IDK_BUILD_I_ ZTD_OFF | ||
#endif | ||
#else | ||
#define ZTD_IDK_BUILD_I_ ZTD_DEFAULT_OFF | ||
#endif // Building or not | ||
|
||
#if defined(ZTD_IDK_DLL) | ||
#if (ZTD_IDK_DLL != 0) | ||
#define ZTD_IDK_DLL_I_ ZTD_ON | ||
#else | ||
#define ZTD_IDK_DLL_I_ ZTD_ON | ||
#endif | ||
#else | ||
#define ZTD_IDK_DLL_I_ ZTD_OFF | ||
#endif // Building or not | ||
|
||
#if defined(ZTD_IDK_API_LINKAGE) | ||
#define ZTD_IDK_API_LINKAGE_I_ ZTD_IDK_API_LINKAGE | ||
#else | ||
#if ZTD_IS_ON(ZTD_IDK_DLL) | ||
#if ZTD_IS_ON(ZTD_COMPILER_VCXX) || ZTD_IS_ON(ZTD_IDK_WINDOWS) || ZTD_IS_ON(ZTD_IDK_CYGWIN) | ||
// MSVC Compiler; or, Windows, or Cygwin platforms | ||
#if ZTD_IS_ON(ZTD_IDK_BUILD) | ||
// Building the library | ||
#if ZTD_IS_ON(ZTD_COMPILER_GCC) | ||
// Using GCC | ||
#define ZTD_IDK_API_LINKAGE_I_ __attribute__((dllexport)) | ||
#else | ||
// Using Clang, MSVC, etc... | ||
#define ZTD_IDK_API_LINKAGE_I_ __declspec(dllexport) | ||
#endif | ||
#else | ||
#if ZTD_IS_ON(ZTD_COMPILER_GCC) | ||
#define ZTD_IDK_API_LINKAGE_I_ __attribute__((dllimport)) | ||
#else | ||
#define ZTD_IDK_API_LINKAGE_I_ __declspec(dllimport) | ||
#endif | ||
#endif | ||
#else | ||
#define ZTD_IDK_API_LINKAGE_I_ | ||
#endif | ||
#else | ||
#define ZTD_IDK_API_LINKAGE_I_ | ||
#endif // DLL or not | ||
#endif // Build definitions | ||
|
||
// clang-format on | ||
|
||
#endif // ZTD_IDK_DETAIL_API_H |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.