Index: trunk/ppSim/src/ppSimVersion.c
===================================================================
--- trunk/ppSim/src/ppSimVersion.c	(revision 23139)
+++ trunk/ppSim/src/ppSimVersion.c	(revision 23229)
@@ -1,7 +1,4 @@
 #include "ppSim.h"
 
-
-psString ppSimVersion(void)
-{
 #ifndef PPSIM_VERSION
 #error "PPSIM_VERSION is not set"
@@ -10,13 +7,21 @@
 #error "PPSIM_BRANCH is not set"
 #endif
-    return psStringCopy(PPSIM_BRANCH "@" PPSIM_VERSION);
+#ifndef PPSIM_SOURCE
+#error "PPSIM_SOURCE is not set"
+#endif
+
+#define xstr(s) str(s)
+#define str(s) #s
+
+psString ppSimVersion(void)
+{
+    char *value = NULL;
+    psStringAppend(&value, "%s@%s", xstr(PPSIM_BRANCH), xstr(PPSIM_VERSION));
+    return value;
 }
 
 psString ppSimSource(void)
 {
-#ifndef PPSIM_SOURCE
-#error "PPSIM_SOURCE is not set"
-#endif
-    return psStringCopy(PPSIM_SOURCE);
+    return psStringCopy(xstr(PPSIM_SOURCE));
 }
 
