Broadcast C++ Toolkit
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
FdsfeApi.h
1 #ifndef __FDSFE_API_H__
2 #define __FDSFE_API_H__
3 
4 #define FDSFE_STR_HELPER(x) #x
5 #define FDSFE_STR(x) FDSFE_STR_HELPER(x)
6 #define FDSFE_MAJOR_VERSION 1
7 #define FDSFE_MINOR_VERSION 0
8 #define FDSFE_BUILD_NUMBER 8
9 #define FDSFE_VERSION_STRING FDSFE_STR(FDSFE_MAJOR_VERSION) "." FDSFE_STR(FDSFE_MINOR_VERSION) "." FDSFE_STR(FDSFE_BUILD_NUMBER)
10 
11 // Generic helper definitions for shared library support
12 #if defined _WIN32 || defined __CYGWIN__
13 #define FDSFE_HELPER_DLL_IMPORT __declspec(dllimport)
14 #define FDSFE_HELPER_DLL_EXPORT __declspec(dllexport)
15 #define FDSFE_HELPER_DLL_LOCAL
16 #else
17 #if __GNUC__ >= 4
18 #define FDSFE_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
19 #define FDSFE_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
20 #define FDSFE_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden")))
21 #else
22 #define FDSFE_HELPER_DLL_IMPORT
23 #define FDSFE_HELPER_DLL_EXPORT
24 #define FDSFE_HELPER_DLL_LOCAL
25 #endif
26 #endif
27 
28 // Now we use the generic helper definitions above to define FDSFE_API and FDSFE_LOCAL.
29 // FDSFE_API is used for the public API symbols. It either DLL imports or DLL exports
30 // FDSFE_LOCAL is used for non-api symbols.
31 #ifdef FDSFE_DLL // defined if FDSFE is compiled as a DLL
32 #ifdef FDSFE_DLL_EXPORTS // defined if we are building the FDSFE DLL (instead of using it)
33 #define FDSFE_API FDSFE_HELPER_DLL_EXPORT
34 #else
35 #define FDSFE_API FDSFE_HELPER_DLL_IMPORT
36 #endif // FDSFE_DLL_EXPORTS
37 #define FDSFE_LOCAL FDSFE_HELPER_DLL_LOCAL
38 #else
39 #define FDSFE_API
40 #define FDSFE_LOCAL
41 #endif // FDSFE_DLL
42 
43 #endif