MISR Toolkit  1.5.1
szip_adpt.h
Go to the documentation of this file.
1 /*
2  * This files has neccesary definitions to provide SZIP DLL
3  * support on Windows platfroms, both MSVC and CodeWarrior
4  * compilers
5  */
6 
7 #ifndef SZAPI_ADPT_H
8 #define SZAPI_ADPT_H
9 
10 #include <SZconfig.h>
11 /* Cmake will define SZip_EXPORTS on Windows when it
12 configures to build a shared library. If you are going to use
13 another build system on windows or create the visual studio
14 projects by hand you need to define SZip_EXPORTS when
15 building the SZip DLL on windows.
16 */
17 
18 #if defined (SZIP_BUILT_AS_DYNAMIC_LIB)
19  #if defined (SZip_EXPORTS) /* Compiling the SZip DLL/Dylib */
20  #if defined (_MSC_VER) && !defined(__MWERKS__) /* MSVC Compiler Case */
21  #define __SZ_DLL__ __declspec(dllexport)
22  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
23  #define __SZ_DLL__ __attribute__ ((visibility("default")))
24  #endif
25  #else /* Importing the DLL into another project */
26  #if defined (_MSC_VER) /* MSVC Compiler Case */
27  #define __SZ_DLL__ __declspec(dllimport)
28  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
29  #define __SZ_DLL__ __attribute__ ((visibility("default")))
30  #endif
31  #endif
32 #else
33  #if defined(WIN32) && !defined(__MWERKS__)
34  #if defined(_SZDLL_)
35  #pragma warning(disable: 4273) /* Disable the dll linkage warnings */
36  #define __SZ_DLL__ __declspec(dllexport)
37  /*#define __DLLVARH425__ __declspec(dllexport)*/
38  #elif defined(_SZUSEDLL_)
39  #define __SZ_DLL__ __declspec(dllimport)
40  /*#define __DLLVARH425__ __declspec(dllimport)*/
41  #else
42  #define __SZ_DLL__
43  /*#define __DLLVARH425__ extern*/
44  #endif /* _SZDLL_ */
45 
46  #else /*WIN32*/
47  #define __SZ_DLL__
48  /*#define __DLLVAR__ extern*/
49  #endif
50 #endif
51 
52 /* If __SZ_DLL__ was never defined, define it here */
53 #ifndef __SZ_DLL__
54  #define __SZ_DLL__
55 #endif
56 
57 #endif

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52