Index: /trunk/mod_coverager/xc_coverager.c
===================================================================
--- /trunk/mod_coverager/xc_coverager.c	(revision 1026)
+++ /trunk/mod_coverager/xc_coverager.c	(revision 1027)
@@ -23,4 +23,5 @@
 
 #include "ext/standard/info.h"
+#include "zend_compile.h"
 
 typedef HashTable *coverager_t;
Index: /trunk/mod_disassembler/xc_disassembler.c
===================================================================
--- /trunk/mod_disassembler/xc_disassembler.c	(revision 1026)
+++ /trunk/mod_disassembler/xc_disassembler.c	(revision 1027)
@@ -1,4 +1,5 @@
 #include "xc_disassembler.h"
 #include "xcache.h"
+#include "xcache/xc_ini.h"
 #include "xcache/xc_utils.h"
 #include "xcache/xc_sandbox.h"
Index: /trunk/processor/processor.m4
===================================================================
--- /trunk/processor/processor.m4	(revision 1026)
+++ /trunk/processor/processor.m4	(revision 1027)
@@ -654,7 +654,9 @@
 #endif
 			case ZEND_JMP:
+#ifdef ZEND_ENGINE_2
 				assert(Z_OP(src->op1).jmp_addr >= processor->active_op_array_src->opcodes && Z_OP(src->op1).jmp_addr - processor->active_op_array_src->opcodes < processor->active_op_array_src->last);
 				Z_OP(dst->op1).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(src->op1).jmp_addr - processor->active_op_array_src->opcodes);
 				assert(Z_OP(dst->op1).jmp_addr >= processor->active_op_array_dst->opcodes && Z_OP(dst->op1).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
+#endif
 				break;
 
@@ -669,7 +671,9 @@
 			case ZEND_JMP_SET_VAR:
 #endif
+#ifdef ZEND_ENGINE_2
 				assert(Z_OP(src->op2).jmp_addr >= processor->active_op_array_src->opcodes && Z_OP(src->op2).jmp_addr - processor->active_op_array_src->opcodes < processor->active_op_array_src->last);
 				Z_OP(dst->op2).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(src->op2).jmp_addr - processor->active_op_array_src->opcodes);
 				assert(Z_OP(dst->op2).jmp_addr >= processor->active_op_array_dst->opcodes && Z_OP(dst->op2).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
+#endif
 				break;
 
@@ -753,5 +757,7 @@
 #endif
 					case ZEND_JMP:
+#ifdef ZEND_ENGINE_2
 						Z_OP(opline->op1).jmp_addr = &dst->opcodes[Z_OP(opline->op1).jmp_addr - src->opcodes];
+#endif
 						break;
 
@@ -766,5 +772,7 @@
 			case ZEND_JMP_SET_VAR:
 #endif
+#ifdef ZEND_ENGINE_2
 						Z_OP(opline->op2).jmp_addr = &dst->opcodes[Z_OP(opline->op2).jmp_addr - src->opcodes];
+#endif
 						break;
 
Index: /trunk/xcache.c
===================================================================
--- /trunk/xcache.c	(revision 1026)
+++ /trunk/xcache.c	(revision 1027)
@@ -3132,7 +3132,11 @@
 /* {{{ proto bool xcache_get_isref(mixed variable)
    XCache internal uses only: Check if variable data is marked referenced */
+#ifdef ZEND_BEGIN_ARG_INFO_EX
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_isref, 0, 0, 1)
 	ZEND_ARG_INFO(1, variable)
 ZEND_END_ARG_INFO()
+#else
+static unsigned char arginfo_xcache_get_isref[] = { 1, BYREF_FORCE };
+#endif
 
 PHP_FUNCTION(xcache_get_isref)
@@ -3657,5 +3661,5 @@
 	if (xc_php_size) {
 		ptr = _php_math_number_format(xc_php_size, 0, '.', ',');
-		snprintf(buf, sizeof(buf), "enabled, %s bytes, %d split(s), with %d slots each", ptr, xc_php_hcache.size, xc_php_hentry.size);
+		snprintf(buf, sizeof(buf), "enabled, %s bytes, %lu split(s), with %lu slots each", ptr, xc_php_hcache.size, xc_php_hentry.size);
 		php_info_print_table_row(2, "Opcode Cache", buf);
 		efree(ptr);
@@ -3666,5 +3670,5 @@
 	if (xc_var_size) {
 		ptr = _php_math_number_format(xc_var_size, 0, '.', ',');
-		snprintf(buf, sizeof(buf), "enabled, %s bytes, %d split(s), with %d slots each", ptr, xc_var_hcache.size, xc_var_hentry.size);
+		snprintf(buf, sizeof(buf), "enabled, %s bytes, %lu split(s), with %lu slots each", ptr, xc_var_hcache.size, xc_var_hentry.size);
 		php_info_print_table_row(2, "Variable Cache", buf);
 		efree(ptr);
Index: /trunk/xcache.h
===================================================================
--- /trunk/xcache.h	(revision 1026)
+++ /trunk/xcache.h	(revision 1027)
@@ -11,9 +11,4 @@
 
 #include <php.h>
-#include <zend_compile.h>
-#include <zend_API.h>
-#include <zend.h>
-#include "php_ini.h"
-#include "zend_hash.h"
 
 #ifdef HAVE_CONFIG_H
Index: /trunk/xcache/xc_compatibility.h
===================================================================
--- /trunk/xcache/xc_compatibility.h	(revision 1026)
+++ /trunk/xcache/xc_compatibility.h	(revision 1027)
@@ -233,5 +233,9 @@
 
 #ifndef PHP_FE_END
-#	define PHP_FE_END {NULL, NULL, NULL}
+#	ifdef ZEND_ENGINE_2
+#		define PHP_FE_END {NULL, NULL, NULL, 0, 0}
+#	else
+#		define PHP_FE_END {NULL, NULL, NULL}
+#	endif
 #endif
 
Index: /trunk/xcache/xc_lock.c
===================================================================
--- /trunk/xcache/xc_lock.c	(revision 1026)
+++ /trunk/xcache/xc_lock.c	(revision 1027)
@@ -1,7 +1,8 @@
+#include "xc_lock.h"
+#include "xcache.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
-#include <php.h>
 #ifndef ZEND_WIN32
 typedef int HANDLE;
Index: /trunk/xcache/xc_lock.h
===================================================================
--- /trunk/xcache/xc_lock.h	(revision 1026)
+++ /trunk/xcache/xc_lock.h	(revision 1027)
@@ -1,2 +1,9 @@
+#ifndef XC_LOCK_H_1913F3DED68715D7CDA5A055E79FE0FF
+#define XC_LOCK_H_1913F3DED68715D7CDA5A055E79FE0FF
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
 typedef struct _xc_lock_t xc_lock_t;
 
@@ -10,2 +17,4 @@
 #define xc_lock(fd)         xc_fcntl_lock(fd)
 #define xc_unlock(fd)       xc_fcntl_unlock(fd)
+
+#endif /* XC_LOCK_H_1913F3DED68715D7CDA5A055E79FE0FF */
