PLplot  5.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
cddll.h
Go to the documentation of this file.
1 #ifndef __CD_DLL_H
2 #define __CD_DLL_H
3 
4 #ifdef USINGDLL
5  #if defined ( WIN32 )
6 // Visual C/C++, Borland, MinGW and Watcom
7  #if defined ( __VISUALC__ ) || defined ( _MSC_VER ) || defined ( __BORLANDC__ ) || defined ( __GNUC__ ) || defined ( __WATCOMC__ )
8  #define CDDLLEXPORT __declspec( dllexport )
9  #define CDDLLIMPORT __declspec( dllimport )
10  #else
11  #define CDDLLEXPORT
12  #define CDDLLIMPORT
13  #endif
14  #elif defined ( __CYGWIN__ )
15  #define CDDLLEXPORT __declspec( dllexport )
16  #define CDDLLIMPORT __declspec( dllimport )
17  #elif defined ( __GNUC__ ) && __GNUC__ > 3
18 // Follow ideas in http://gcc.gnu.org/wiki/Visibility for GCC version 4.x
19 // The following forces exported symbols specifically designated with
20 // CDDLLEXPORT to be visible.
21  #define CDDLLEXPORT __attribute__ ( ( visibility( "default" ) ) )
22  #define CDDLLIMPORT
23  #endif
24 #endif
25 
26 // For an unknown compiler or static built we clear the macros
27 #ifndef CDDLLEXPORT
28  #define CDDLLEXPORT
29  #define CDDLLIMPORT
30 #endif
31 
32 // The IMPEXP macros will always be set to DLLIMPORT (even for
33 // the static library, but DLLIMPORT is empty in this case). If
34 // cmake sets the corresponding macro xxxx_EXPORTS if the
35 // corresponding library is built DLLIMPEXP is set to DLLEXPORT
36 #if defined ( nistcd_EXPORTS )
37  #define CDDLLIMPEXP CDDLLEXPORT
38  #define CDDLLIMPEXP_DATA( type ) CDDLLEXPORT type
39 #else
40  #define CDDLLIMPEXP CDDLLIMPORT
41  #define CDDLLIMPEXP_DATA( type ) CDDLLIMPORT type
42 #endif
43 
44 #endif // __CD_DLL_H