diff options
author | midipix <writeonce@midipix.org> | 2016-12-12 00:35:21 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-12-12 16:57:25 -0500 |
commit | b003e95b91d47e35efdf634111769d1c185f7cd2 (patch) | |
tree | 2d613d5dd8fc0ea9445a3108ef7f5c0442f67f6e /include/ntcon/ntcon_compiler.h | |
parent | f2b6c18c945ce5f4185224fbc4762f32e697d28d (diff) | |
download | ntcon-b003e95b91d47e35efdf634111769d1c185f7cd2.tar.bz2 ntcon-b003e95b91d47e35efdf634111769d1c185f7cd2.tar.xz |
api headers: added ntcon_{abi|compiler}.h for smooth foreign toolchain support.
Diffstat (limited to 'include/ntcon/ntcon_compiler.h')
-rw-r--r-- | include/ntcon/ntcon_compiler.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/ntcon/ntcon_compiler.h b/include/ntcon/ntcon_compiler.h new file mode 100644 index 0000000..e8a4de6 --- /dev/null +++ b/include/ntcon/ntcon_compiler.h @@ -0,0 +1,30 @@ +#ifndef _NTCON_COMPILER_H_ +#define _NTCON_COMPILER_H_ + +#include "ntcon_abi.h" + +#ifndef _MIDIPIX_FREESTANDING + +#ifdef _MSC_VER + +/* visual studio: begin */ +#ifndef __attr_export__ +#define __attr_export__ __declspec(dllexport) +#define __attr_import__ __declspec(dllimport) +#endif +/* visual studio: end */ + +#else + +/* all other compilers: begin */ +#ifndef __attr_export__ +#define __attr_export__ __attribute__((__dllexport__)) +#define __attr_import__ __attribute__((__dllimport__)) +#endif +/* all other compilers: end */ + +#endif + +#endif + +#endif |