summaryrefslogtreecommitdiff
path: root/include/sqfs/predef.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sqfs/predef.h')
-rw-r--r--include/sqfs/predef.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/sqfs/predef.h b/include/sqfs/predef.h
new file mode 100644
index 0000000..210f306
--- /dev/null
+++ b/include/sqfs/predef.h
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-3.0-or-later */
+/*
+ * predef.h
+ *
+ * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
+ */
+#ifndef SQFS_PREDEF_H
+#define SQFS_PREDEF_H
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+ #ifdef SQFS_BUILDING_DLL
+ #if defined(__GNUC__) || defined(__clang__)
+ #define SQFS_API __attribute__ ((dllexport))
+ #else
+ #define SQFS_API __declspec(dllexport)
+ #endif
+ #else
+ #if defined(__GNUC__) || defined(__clang__)
+ #define SQFS_API __attribute__ ((dllimport))
+ #else
+ #define SQFS_API __declspec(dllimport)
+ #endif
+ #endif
+
+ #define SQFS_INTERNAL
+#else
+ #if defined(__GNUC__) || defined(__clang__)
+ #define SQFS_API __attribute__ ((visibility ("default")))
+ #define SQFS_INTERNAL __attribute__ ((visibility ("hidden")))
+ #else
+ #define SQFS_API
+ #define SQFS_INTERNAL
+ #endif
+#endif
+
+#endif /* SQFS_PREDEF_H */