Changeset 1027 in svn


Ignore:
Timestamp:
2012-07-22T08:57:08+02:00 (3 years ago)
Author:
Xuefer
Message:

refactor: improve build, kill warning

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/mod_coverager/xc_coverager.c

    r1026 r1027  
    2323
    2424#include "ext/standard/info.h"
     25#include "zend_compile.h"
    2526
    2627typedef HashTable *coverager_t;
  • trunk/mod_disassembler/xc_disassembler.c

    r1026 r1027  
    11#include "xc_disassembler.h"
    22#include "xcache.h"
     3#include "xcache/xc_ini.h"
    34#include "xcache/xc_utils.h"
    45#include "xcache/xc_sandbox.h"
  • trunk/processor/processor.m4

    r964 r1027  
    654654#endif
    655655            case ZEND_JMP:
     656#ifdef ZEND_ENGINE_2
    656657                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);
    657658                Z_OP(dst->op1).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(src->op1).jmp_addr - processor->active_op_array_src->opcodes);
    658659                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);
     660#endif
    659661                break;
    660662
     
    669671            case ZEND_JMP_SET_VAR:
    670672#endif
     673#ifdef ZEND_ENGINE_2
    671674                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);
    672675                Z_OP(dst->op2).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(src->op2).jmp_addr - processor->active_op_array_src->opcodes);
    673676                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);
     677#endif
    674678                break;
    675679
     
    753757#endif
    754758                    case ZEND_JMP:
     759#ifdef ZEND_ENGINE_2
    755760                        Z_OP(opline->op1).jmp_addr = &dst->opcodes[Z_OP(opline->op1).jmp_addr - src->opcodes];
     761#endif
    756762                        break;
    757763
     
    766772            case ZEND_JMP_SET_VAR:
    767773#endif
     774#ifdef ZEND_ENGINE_2
    768775                        Z_OP(opline->op2).jmp_addr = &dst->opcodes[Z_OP(opline->op2).jmp_addr - src->opcodes];
     776#endif
    769777                        break;
    770778
  • trunk/xcache.c

    r1026 r1027  
    31323132/* {{{ proto bool xcache_get_isref(mixed variable)
    31333133   XCache internal uses only: Check if variable data is marked referenced */
     3134#ifdef ZEND_BEGIN_ARG_INFO_EX
    31343135ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get_isref, 0, 0, 1)
    31353136    ZEND_ARG_INFO(1, variable)
    31363137ZEND_END_ARG_INFO()
     3138#else
     3139static unsigned char arginfo_xcache_get_isref[] = { 1, BYREF_FORCE };
     3140#endif
    31373141
    31383142PHP_FUNCTION(xcache_get_isref)
     
    36573661    if (xc_php_size) {
    36583662        ptr = _php_math_number_format(xc_php_size, 0, '.', ',');
    3659         snprintf(buf, sizeof(buf), "enabled, %s bytes, %d split(s), with %d slots each", ptr, xc_php_hcache.size, xc_php_hentry.size);
     3663        snprintf(buf, sizeof(buf), "enabled, %s bytes, %lu split(s), with %lu slots each", ptr, xc_php_hcache.size, xc_php_hentry.size);
    36603664        php_info_print_table_row(2, "Opcode Cache", buf);
    36613665        efree(ptr);
     
    36663670    if (xc_var_size) {
    36673671        ptr = _php_math_number_format(xc_var_size, 0, '.', ',');
    3668         snprintf(buf, sizeof(buf), "enabled, %s bytes, %d split(s), with %d slots each", ptr, xc_var_hcache.size, xc_var_hentry.size);
     3672        snprintf(buf, sizeof(buf), "enabled, %s bytes, %lu split(s), with %lu slots each", ptr, xc_var_hcache.size, xc_var_hentry.size);
    36693673        php_info_print_table_row(2, "Variable Cache", buf);
    36703674        efree(ptr);
  • trunk/xcache.h

    r991 r1027  
    1111
    1212#include <php.h>
    13 #include <zend_compile.h>
    14 #include <zend_API.h>
    15 #include <zend.h>
    16 #include "php_ini.h"
    17 #include "zend_hash.h"
    1813
    1914#ifdef HAVE_CONFIG_H
  • trunk/xcache/xc_compatibility.h

    r1026 r1027  
    233233
    234234#ifndef PHP_FE_END
    235 #   define PHP_FE_END {NULL, NULL, NULL}
     235#   ifdef ZEND_ENGINE_2
     236#       define PHP_FE_END {NULL, NULL, NULL, 0, 0}
     237#   else
     238#       define PHP_FE_END {NULL, NULL, NULL}
     239#   endif
    236240#endif
    237241
  • trunk/xcache/xc_lock.c

    r982 r1027  
     1#include "xc_lock.h"
     2#include "xcache.h"
    13#include <stdio.h>
    24#include <string.h>
    35#include <stdlib.h>
    46
    5 #include <php.h>
    67#ifndef ZEND_WIN32
    78typedef int HANDLE;
  • trunk/xcache/xc_lock.h

    r982 r1027  
     1#ifndef XC_LOCK_H_1913F3DED68715D7CDA5A055E79FE0FF
     2#define XC_LOCK_H_1913F3DED68715D7CDA5A055E79FE0FF
     3
     4#if _MSC_VER > 1000
     5#pragma once
     6#endif // _MSC_VER > 1000
     7
    18typedef struct _xc_lock_t xc_lock_t;
    29
     
    1017#define xc_lock(fd)         xc_fcntl_lock(fd)
    1118#define xc_unlock(fd)       xc_fcntl_unlock(fd)
     19
     20#endif /* XC_LOCK_H_1913F3DED68715D7CDA5A055E79FE0FF */
Note: See TracChangeset for help on using the changeset viewer.