summaryrefslogtreecommitdiff
path: root/archived/projt-launcher/scripts/gen-nbt-export.sh
diff options
context:
space:
mode:
Diffstat (limited to 'archived/projt-launcher/scripts/gen-nbt-export.sh')
-rwxr-xr-xarchived/projt-launcher/scripts/gen-nbt-export.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/archived/projt-launcher/scripts/gen-nbt-export.sh b/archived/projt-launcher/scripts/gen-nbt-export.sh
new file mode 100755
index 0000000000..4926290429
--- /dev/null
+++ b/archived/projt-launcher/scripts/gen-nbt-export.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Generate nbt_export.h for libnbtplusplus
+
+cat > "$1" << 'EOF'
+#ifndef NBT_EXPORT_H
+#define NBT_EXPORT_H
+
+#ifdef NBT_STATIC_DEFINE
+# define NBT_EXPORT
+# define NBT_NO_EXPORT
+#else
+# if defined(_WIN32) || defined(__CYGWIN__)
+# define NBT_EXPORT
+# define NBT_NO_EXPORT
+# else
+# ifndef NBT_EXPORT
+# ifdef nbt___EXPORTS
+# define NBT_EXPORT __attribute__((visibility("default")))
+# else
+# define NBT_EXPORT __attribute__((visibility("default")))
+# endif
+# endif
+# ifndef NBT_NO_EXPORT
+# define NBT_NO_EXPORT __attribute__((visibility("hidden")))
+# endif
+# endif
+#endif
+
+#ifndef NBT_DEPRECATED
+# if defined(_MSC_VER)
+# define NBT_DEPRECATED __declspec(deprecated)
+# else
+# define NBT_DEPRECATED __attribute__((__deprecated__))
+# endif
+#endif
+
+#ifndef NBT_DEPRECATED_EXPORT
+# define NBT_DEPRECATED_EXPORT NBT_EXPORT NBT_DEPRECATED
+#endif
+
+#ifndef NBT_DEPRECATED_NO_EXPORT
+# define NBT_DEPRECATED_NO_EXPORT NBT_NO_EXPORT NBT_DEPRECATED
+#endif
+
+#endif /* NBT_EXPORT_H */
+EOF