summaryrefslogtreecommitdiffhomepage
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-11-19 20:49:42 -0500
committermidipix <writeonce@midipix.org>2017-11-19 20:49:42 -0500
commit05785e920a1736bd06554c7f4548e533f1a54e13 (patch)
tree30e73f663f74c15f1b8a133cf37170651eadc867 /src/internal
parentaee3a687ec517c4a668c2442740a2544beac1a9b (diff)
downloadw32lib-05785e920a1736bd06554c7f4548e533f1a54e13.tar.bz2
w32lib-05785e920a1736bd06554c7f4548e533f1a54e13.tar.xz
(mis)guid'ed data: iid: initial commit.
Diffstat (limited to 'src/internal')
-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)))); \
+/************************************************************************************************/