-
Notifications
You must be signed in to change notification settings - Fork 782
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add cross platform extern marking to cephes.h
- Loading branch information
1 parent
ddd38ab
commit 04bee2b
Showing
2 changed files
with
180 additions
and
148 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,25 @@ | ||
// Macros for exporting DLL symbols on Windows | ||
// Usage example: | ||
// In header file: | ||
// class CEPHES_EXPORT MyClass { ... }; | ||
// | ||
// Results in the following declarations: | ||
// When included while compiling the library itself: | ||
// class __declspec(dllexport) MyClass { ... }; | ||
// When included while compiling other code against the library: | ||
// class __declspec(dllimport) MyClass { ... }; | ||
|
||
#pragma once | ||
|
||
#ifdef _WIN32 | ||
# define CEPHES_EXPORT __declspec(dllimport) | ||
# define CEPHES_EXTERN_EXPORT __declspec(dllimport) | ||
#else | ||
#ifdef __APPLE__ | ||
# define CEPHES_EXPORT __attribute__((visibility("default"))) | ||
# define CEPHES_EXTERN_EXPORT extern | ||
#else | ||
# define CEPHES_EXPORT | ||
# define CEPHES_EXTERN_EXPORT extern | ||
#endif | ||
#endif |