-#define wxMAKE_VERSION_STRING(x, y, z) #x #y #z
-#define wxMAKE_VERSION_DOT_STRING(x, y, z) #x "." #y "." #z
+#define wxSTRINGIZE(x) #x
+#define wxMAKE_VERSION_STRING(x, y, z) \
+ wxSTRINGIZE(x) wxSTRINGIZE(y) wxSTRINGIZE(z)
+#define wxMAKE_VERSION_DOT_STRING(x, y, z) \
+ wxSTRINGIZE(x) "." wxSTRINGIZE(y) "." wxSTRINGIZE(z)