libtranscript
 All Data Structures Functions Variables Enumerations Enumerator Modules
api.h
1 /* Copyright (C) 2011 G.P. Halkes
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License version 3, as
4  published by the Free Software Foundation.
5 
6  This program is distributed in the hope that it will be useful,
7  but WITHOUT ANY WARRANTY; without even the implied warranty of
8  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  GNU General Public License for more details.
10 
11  You should have received a copy of the GNU General Public License
12  along with this program. If not, see <http://www.gnu.org/licenses/>.
13 */
14 #ifndef TRANSCRIPT_API_H
15 #define TRANSCRIPT_API_H
16 
17 #if defined(_WIN32) || defined(__CYGWIN__)
18  #define TRANSCRIPT_EXPORT __declspec(dllexport)
19  #define TRANSCRIPT_IMPORT __declspec(dllimport)
20  #define TRANSCRIPT_LOCAL
21 #else
22  #if __GNUC__ >= 4 || defined(__clang__)
23  #define TRANSCRIPT_EXPORT __attribute__((visibility("default")))
24  #define TRANSCRIPT_IMPORT __attribute__((visibility("default")))
25  #define TRANSCRIPT_LOCAL __attribute__((visibility("hidden")))
26  #else
27  #define TRANSCRIPT_EXPORT
28  #define TRANSCRIPT_IMPORT
29  #define TRANSCRIPT_LOCAL
30  #endif
31 #endif
32 
33 #ifdef TRANSCRIPT_BUILD_DSO
34  #define TRANSCRIPT_API TRANSCRIPT_EXPORT
35 #else
36  #define TRANSCRIPT_API TRANSCRIPT_IMPORT
37 #endif
38 
39 #endif