VAPOR3 3.9.4
common.h
Go to the documentation of this file.
1
2#ifdef WIN32
3 #pragma warning(disable : 4018 4244 4267 4305)
4 #ifdef COMMON_EXPORTS
5 #define COMMON_API __declspec(dllexport)
6 #else
7 #define COMMON_API __declspec(dllimport)
8 #endif
9
10 #ifdef VDF_EXPORTS
11 #define VDF_API __declspec(dllexport)
12 #else
13 #define VDF_API __declspec(dllimport)
14 #endif
15
16 #ifdef WASP_EXPORTS
17 #define WASP_API __declspec(dllexport)
18 #else
19 #define WASP_API __declspec(dllimport)
20 #endif
21
22 #ifdef FLOW_EXPORTS
23 #define FLOW_API __declspec(dllexport)
24 #else
25 #define FLOW_API __declspec(dllimport)
26 #endif
27
28 #ifdef OSGL_EXPORTS
29 #define OSGL_API __declspec(dllexport)
30 #else
31 #define OSGL_API __declspec(dllimport)
32 #endif
33
34 #ifdef PARAMS_EXPORTS
35 #define PARAMS_API __declspec(dllexport)
36 #else
37 #define PARAMS_API __declspec(dllimport)
38 #endif
39
40 #ifdef RENDER_EXPORTS
41 #define RENDER_API __declspec(dllexport)
42 #else
43 #define RENDER_API __declspec(dllimport)
44 #endif
45
46 #ifdef UDUNITS2_EXPORTS
47 #define UDUNITS2_API __declspec(dllexport)
48 #else
49 #define UDUNITS2_API __declspec(dllimport)
50 #endif
51
52 #ifdef GRIBAPI_EXPORTS
53 #define GRIBAPI_API __declspec(dllexport)
54 #else
55 #define GRIBAPI_API __declspec(dllimport)
56 #endif
57
58 #ifdef JPEG_EXPORTS
59 // Slightly different definitions for jpeg project:
60 #define JPEG_GLOBAL(type) __declspec(dllexport) type
61 #define JPEG_EXTERN(type) extern __declspec(dllexport) type
62 #else
63 #define JPEG_GLOBAL(type) __declspec(dllimport) type
64 #ifdef __cplusplus
65 #define JPEG_EXTERN(type) extern "C" __declspec(dllimport) type
66 #else
67 #define JPEG_EXTERN(type) extern __declspec(dllimport) type
68 #endif
69 #endif // JPEG_EXPORTS
70
71#else // not WIN32, everything is exported
72 #define COMMON_API
73 #define VDF_API
74 #define WASP_API
75 #define FLOW_API
76 #define OSGL_API
77 #define PARAMS_API
78 #define RENDER_API
79 #define GRIBAPI_API
80 #define JPEG_GLOBAL(type) type
81 // Assume all outside projects depending on JPEG are C++
82 #ifdef JPEG_EXPORTS
83 #define JPEG_EXTERN(type) extern type
84 #else
85 #define JPEG_EXTERN(type) extern "C" type
86 #endif // ifeq JPEG_EXPORTS
87#endif // end !Win32
88
89#ifndef M_PI
90 #define M_PI 3.1415926535897932384626433832795
91#endif