Index: /trunk/xcache.c
===================================================================
--- /trunk/xcache.c	(revision 17)
+++ /trunk/xcache.c	(revision 18)
@@ -27,10 +27,12 @@
 #include "opcode_spec.h"
 
-#undef NDEBUG
 #ifdef DEBUG
+#	undef NDEBUG
 #	undef inline
 #	define inline
 #else
-#	define NDEBUG
+#	ifndef NDEBUG
+#		define NDEBUG
+#	endif
 #endif
 #include <assert.h>
@@ -1877,5 +1879,7 @@
 #endif
 {
+#ifdef ZEND_ENGINE_2
 	TSRMLS_FETCH();
+#endif
 
 	xc_request_shutdown(TSRMLS_C);
