diff --git a/src/xpdev/genwrap.h b/src/xpdev/genwrap.h
index 8c654fb47b72b3f2f606021b48675b2d24b3a451..56d93ceea493de434b6aa33b87e8aad04a817c8e 100644
--- a/src/xpdev/genwrap.h
+++ b/src/xpdev/genwrap.h
@@ -8,7 +8,7 @@
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
  *																			*
- * Copyright 2007 Rob Swindell - http://www.synchro.net/copyright.html		*
+ * Copyright 2008 Rob Swindell - http://www.synchro.net/copyright.html		*
  *																			*
  * This library is free software; you can redistribute it and/or			*
  * modify it under the terms of the GNU Lesser General Public License		*
@@ -160,9 +160,14 @@ extern "C" {
 /* String Functionss */
 /*********************/
 
-#define snprintf	safe_snprintf
+#ifndef USE_SNPRINTF
+	#define snprintf		safe_snprintf
+#endif
 
 #if defined(_MSC_VER) || defined(__MINGW32__) || defined(__DMC__)
+#if !defined(snprintf)
+	#define snprintf		_snprintf
+#endif
 	#define vsnprintf		_vsnprintf
 #endif