summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/u16ports/u16ports.h18
-rw-r--r--include/u16ports/u16ports_api.h35
2 files changed, 53 insertions, 0 deletions
diff --git a/include/u16ports/u16ports.h b/include/u16ports/u16ports.h
new file mode 100644
index 0000000..fbce171
--- /dev/null
+++ b/include/u16ports/u16ports.h
@@ -0,0 +1,18 @@
+#ifndef U16PORTS_H
+#define U16PORTS_H
+
+#include <stdint.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include "u16ports_api.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/u16ports/u16ports_api.h b/include/u16ports/u16ports_api.h
new file mode 100644
index 0000000..715c10e
--- /dev/null
+++ b/include/u16ports/u16ports_api.h
@@ -0,0 +1,35 @@
+#ifndef U16PORTS_API_H
+#define U16PORTS_API_H
+
+#include <limits.h>
+
+/* u16_export */
+#if defined(__dllexport)
+#define u16_export __dllexport
+#else
+#define u16_export
+#endif
+
+/* u16_import */
+#if defined(__dllimport)
+#define u16_import __dllimport
+#else
+#define u16_import
+#endif
+
+/* u16_api */
+#ifndef U16_APP
+#if defined (U16_EXPORT)
+#define u16_api u16_export
+#elif defined (U16_IMPORT)
+#define u16_api u16_import
+#elif defined (U16_STATIC)
+#define u16_api
+#else
+#define u16_api
+#endif
+#else
+#define u16_api
+#endif
+
+#endif