summaryrefslogtreecommitdiffhomepage
path: root/src/internal/w32lib_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/w32lib_impl.h')
-rw-r--r--src/internal/w32lib_impl.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/internal/w32lib_impl.h b/src/internal/w32lib_impl.h
new file mode 100644
index 0000000..9e5bcec
--- /dev/null
+++ b/src/internal/w32lib_impl.h
@@ -0,0 +1,25 @@
+#include <stdint.h>
+
+struct w32lib_guid {
+ uint32_t data1;
+ uint16_t data2;
+ uint16_t data3;
+ unsigned char data4[8];
+};
+
+#define W32LIB_QUOTE(name) #name
+
+#define W32LIB_HIDDEN_JOIN(prefix,name) __ ## prefix ## _ ## name
+#define W32LIB_NAMESPACE_JOIN(prefix,name) w32lib ## _ ## prefix ## _ ## name
+#define W32LIB_LEGACY_JOIN(prefix,name) prefix ## _ ## name
+
+#define W32LIB_HIDDEN_NAME(prefix,name) W32LIB_HIDDEN_JOIN(prefix,name)
+#define W32LIB_NAMESPACE_NAME(prefix,name) W32LIB_NAMESPACE_JOIN(prefix,name)
+#define W32LIB_LEGACY_NAME(prefix,name) W32LIB_LEGACY_JOIN(prefix,name)
+
+/************************************************************************************************/
+#define W32LIB_GUID(hname,mname,lname,u32,u16a,u16b,u8a,u8b,u8c,u8d,u8e,u8f,u8g,u8h) \
+static const struct w32lib_guid hname = {u32,u16a,u16b,{u8a,u8b,u8c,u8d,u8e,u8f,u8g,u8h}}; \
+extern const struct w32lib_guid mname __attribute((weak,alias(W32LIB_QUOTE(hname)))); \
+extern const struct w32lib_guid lname __attribute((weak,alias(W32LIB_QUOTE(hname)))); \
+/************************************************************************************************/