diff --git a/src/xpdev/genwrap.h b/src/xpdev/genwrap.h
index 9cc23c67792c0cea99e5c23b608dd090de4b8986..8076d241a21ae32f47179b3b7623dbbd17ad5ed9 100644
--- a/src/xpdev/genwrap.h
+++ b/src/xpdev/genwrap.h
@@ -298,11 +298,12 @@ DLLEXPORT char		DLLCALL c_unescape_char(char ch);
 
 /* Millisecond clock */
 typedef		clock_t				msclock_t;
-#define		MSCLOCKS_PER_SEC	1000
 #if defined(_WIN32)
-	#define		msclock()		clock()
+	#define		MSCLOCKS_PER_SEC	CLOCKS_PER_SEC	/* e.g. 18.2 on DOS, 1000.0 on Win32 */
+	#define		msclock()			clock()
 #else
-	clock_t		msclock(void);
+	#define		MSCLOCKS_PER_SEC	1000
+	msclock_t	msclock(void);
 #endif
 
 #if defined(__cplusplus)