chiark / gitweb /
fix STRING macro
[ypp-sc-tools.db-test.git] / pctb / common.h
index 23b8ca33972d29bf589cae1799896c70408392bf..52f57d699c4cefd959d300bc44349038d7e4e5a8 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <locale.h>
 #include <stdarg.h>
+#include <math.h>
 #include <stdio.h>
 #include <errno.h>
 #include <assert.h>
@@ -163,6 +164,9 @@ char *masprintf(const char *fmt, ...) FMT(1,2);
 
 
 #define ARRAYSIZE(a) ((sizeof((a)) / sizeof((a)[0])))
+#define FILLZERO(obj) (memset(&(obj),0,sizeof((obj))))
 
+#define STRING2(x) #x
+#define STRING(x) STRING2(x)
 
 #endif /*COMMON_H*/