Define qu and llu in str.h and _Static_assert that they're 64 bits.
[darkstat] / str.h
diff --git a/str.h b/str.h
index 80e9e23..24a8ce1 100644 (file)
--- a/str.h
+++ b/str.h
 
 #include <sys/types.h>
 #include <stdarg.h>
+#include <stdint.h>  /* for uint64_t */
+
+typedef long long unsigned int qu; /* as in appendf("%qu") */
+typedef long long unsigned int llu; /* as in printf("%llu") */
+
+_Static_assert(sizeof(qu) == sizeof(uint64_t), "qu must be uint64_t");
+_Static_assert(sizeof(llu) == sizeof(uint64_t), "llu must be uint64_t");
 
 /* Note: the contents are 8-bit clean and not zero terminated! */