#define U8_16BIT_TABLE_INDICATOR (0x8000U)
/* The following are some convenience macros. */
-#define U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3) \
- (u) = ((uint32_t)(b1) & 0x0F) << 12 | ((uint32_t)(b2) & 0x3F) << 6 | \
- (uint32_t)(b3) & 0x3F;
+#define U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3) \
+ (u) = ((((uint32_t)(b1) & 0x0F) << 12) | \
+ (((uint32_t)(b2) & 0x3F) << 6) | \
+ ((uint32_t)(b3) & 0x3F));
#define U8_SIMPLE_SWAP(a, b, t) \
(t) = (a); \
return (ret_val);
}
+
+#if defined(_KERNEL) && defined(HAVE_SPL)
+
+static int unicode_init(void) { return 0; }
+static int unicode_fini(void) { return 0; }
+
+spl_module_init(unicode_init);
+spl_module_exit(unicode_fini);
+
+MODULE_DESCRIPTION("Unicode implementation");
+MODULE_AUTHOR(ZFS_META_AUTHOR);
+MODULE_LICENSE(ZFS_META_LICENSE);
+
+EXPORT_SYMBOL(u8_validate);
+EXPORT_SYMBOL(u8_strcmp);
+EXPORT_SYMBOL(u8_textprep_str);
+#endif