Changeset 255 for branches/1.1


Ignore:
Timestamp:
2006-10-17T20:30:41+02:00 (8 years ago)
Author:
moo
Message:
  • fix build on rare arch
  • fix build on Mac OS X
  • merged from trunk: 159,161-162,167-180,182,184,186-187,194
    • [194] PHP_5_2: new element in zend_brk_cont_element
    • [186] [187] fix build on some rare arch
    • [184] fix tplcov
    • [178] fix type processor_t conflict with Mac OS X
Location:
branches/1.1
Files:
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/1.1

  • branches/1.1/NEWS

    r247 r255  
    3131 
    3232Others: 
     33 * fix build on rare arch 
     34 * fix build on Mac OS X 
    3335 * kill compiler warnings 
    3436 * zts build 
     
    3739ChangeLog 
    3840======== 
     41 * merged from trunk: 159,161-162,167-180,182,184,186-187,194 
     42   * [194] PHP_5_2: new element in zend_brk_cont_element 
     43   * [186] [187] fix build on some rare arch 
     44   * [184] fix tplcov 
     45   * [178] fix type processor_t conflict with Mac OS X 
    3946 * remove redundant open_basedir check, it's done before compiling 
    4047 * trick in_compilation state, don't trigger __autoload at compile time 
  • branches/1.1/THANKS

    r135 r255  
    33Alex <ale@freebsd.org>, redist to FreeBSD 
    44darix <darix@irssi.org>, redist to openSUSE 
    5 judas_iscariote <darix@irssi.org>, redist/test with openSUSE 
     5judas_iscariote <judas.iscariote@gmail.com>, redist/test with openSUSE 
    66Finjon Kiang <kiange@gmail.com>, Chinese Traditional translation 
    77 
  • branches/1.1/admin/common.php

    r134 r255  
    33function get_language_file_ex($name, $l, $s) 
    44{ 
    5     static $map = array( 
     5    static $lmap = array( 
    66            'zh'    => 'zh-simplified', 
    77            'zh-hk' => 'zh-traditional', 
    88            'zh-tw' => 'zh-traditional', 
    99            ); 
     10    static $smap = array( 
     11            'gbk'     => 'gb2312', 
     12            'gb18030' => 'gb2312', 
     13            ); 
    1014 
    11     if (isset($map[$l])) { 
    12         $l = $map[$l]; 
     15    if (isset($lmap[$l])) { 
     16        $l = $lmap[$l]; 
    1317    } 
    1418    if (file_exists($file = "$name-$l-$s.lang.php")) { 
    1519        return $file; 
     20    } 
     21    if (isset($smap[$s])) { 
     22        $s = $smap[$s]; 
     23        if (file_exists($file = "$name-$l-$s.lang.php")) { 
     24            return $file; 
     25        } 
    1626    } 
    1727    if (file_exists($file = "$name-$l.lang.php")) { 
  • branches/1.1/admin/config.php.example

    r125 r255  
    1616function ob_filter_path_nicer($o) 
    1717{ 
    18     $o = str_replace($_SERVER['DOCUMENT_ROOT'],  "{DOCROOT}/", $o); 
    19     $xcachedir = realpath(dirname(__FILE__) . "/../"); 
    20     $o = str_replace($xcachedir . "/", "{XCache}/", $o); 
    21     $o = str_replace("/home/", "{H}/", $o); 
     18    $sep = DIRECTORY_SEPARATOR; 
     19    $o = str_replace($_SERVER['DOCUMENT_ROOT'],  "{DOCROOT}$sep", $o); 
     20    $xcachedir = realpath(dirname(__FILE__) . "$sep..$sep"); 
     21    $o = str_replace($xcachedir . $sep, "{XCache}$sep", $o); 
     22    if ($sep == '/') { 
     23        $o = str_replace("/home/", "{H}/", $o); 
     24    } 
    2225    return $o; 
    2326} 
  • branches/1.1/config.m4

    r148 r255  
    5959 
    6060  AC_PATH_PROGS([AWK], [gawk awk]) 
     61  dnl clean locale for gawk 3.1.5 assertion bug 
     62  if echo | LANG=C "$AWK" -- '' > /dev/null 2>&1 ; then 
     63    AWK="LANG=C $AWK" 
     64  else 
     65    if echo | /usr/bin/env - "$AWK" -- '' > /dev/null 2>&1 ; then 
     66      AWK="/usr/bin/env - $AWK" 
     67    fi 
     68  fi 
    6169  PHP_SUBST([AWK]) 
    6270  AC_PATH_PROGS([M4], [m4]) 
     71  if echo | "$M4" -E > /dev/null 2>&1 ; then 
     72    M4="$M4 -E" 
     73  fi 
    6374  PHP_SUBST([M4]) 
    6475  AC_PATH_PROGS([GREP], [grep]) 
  • branches/1.1/coverager.c

    r90 r255  
    235235            zend_hash_move_forward(XG(coverages)); 
    236236        } 
     237        efree(outfilename); 
    237238    } 
    238239 
  • branches/1.1/coverager/common.php

    r134 r255  
    33function get_language_file_ex($name, $l, $s) 
    44{ 
    5     static $map = array( 
     5    static $lmap = array( 
    66            'zh'    => 'zh-simplified', 
    77            'zh-hk' => 'zh-traditional', 
    88            'zh-tw' => 'zh-traditional', 
    99            ); 
     10    static $smap = array( 
     11            'gbk'     => 'gb2312', 
     12            'gb18030' => 'gb2312', 
     13            ); 
    1014 
    11     if (isset($map[$l])) { 
    12         $l = $map[$l]; 
     15    if (isset($lmap[$l])) { 
     16        $l = $lmap[$l]; 
    1317    } 
    1418    if (file_exists($file = "$name-$l-$s.lang.php")) { 
    1519        return $file; 
     20    } 
     21    if (isset($smap[$s])) { 
     22        $s = $smap[$s]; 
     23        if (file_exists($file = "$name-$l-$s.lang.php")) { 
     24            return $file; 
     25        } 
    1626    } 
    1727    if (file_exists($file = "$name-$l.lang.php")) { 
  • branches/1.1/coverager/config.php.example

    r124 r255  
    2121function ob_filter_path_nicer($o) 
    2222{ 
    23     $o = str_replace($_SERVER['DOCUMENT_ROOT'],  "{DOCROOT}/", $o); 
    24     $xcachedir = realpath(dirname(__FILE__) . "/../"); 
    25     $o = str_replace($xcachedir . "/", "{XCache}/", $o); 
    26     $o = str_replace("/home/", "{H}/", $o); 
     23    $sep = DIRECTORY_SEPARATOR; 
     24    $o = str_replace($_SERVER['DOCUMENT_ROOT'],  "{DOCROOT}$sep", $o); 
     25    $xcachedir = realpath(dirname(__FILE__) . "$sep..$sep"); 
     26    $o = str_replace($xcachedir . $sep, "{XCache}$sep", $o); 
     27    if ($sep == '/') { 
     28        $o = str_replace("/home/", "{H}/", $o); 
     29    } 
    2730    return $o; 
    2831} 
  • branches/1.1/coverager/coverager.php

    r124 r255  
    6262        $this->path = isset($_GET['path']) ? $_GET['path'] : ''; 
    6363        $this->path = preg_replace('!\.{2,}!', '.', $this->path); 
    64         $this->path = preg_replace('![\\\\/]{2,}!', '/', $this->path); 
     64        $qsep = preg_quote(DIRECTORY_SEPARATOR, '!'); 
     65        $this->path = preg_replace("![\\\\$qsep]{2,}!", DIRECTORY_SEPARATOR, $this->path); 
     66        $this->path = preg_replace("!$qsep$!", '', $this->path); 
    6567        if ($this->path == '/') { 
    6668            $this->path = ''; 
     
    118120            list($tplfile, $tpllines, $tplcov) = $this->loadTplCov($fileinfo['cov'], substr($this->outpath, $this->datadir_len)); 
    119121            if ($tplfile) { 
    120                 $tplcov = sprint_cov($tplinfo['tplcov'], $tpllines); 
     122                $tplcov = sprint_cov($tplcov, $tpllines); 
    121123                unset($tpllines); 
    122124            } 
  • branches/1.1/coverager/coverager.tpl.php

    r145 r255  
    22<html xmlns="http://www.w3.org/1999/xhtml"> 
    33<head> 
    4     <meta http-equiv="Content-Language" content="en-us" /> 
    54<?php 
    65echo <<<HEAD 
     
    6867    global $cycle; 
    6968    if ($info['files'] || $info['todos']) { 
     69        $srcdir .= DIRECTORY_SEPARATOR; 
    7070        $c = $cycle->next(); 
    7171        $srcdir_html = htmlspecialchars($srcdir); 
  • branches/1.1/mkstructinfo.awk

    r52 r255  
    33BEGIN { 
    44    brace = 0; 
     5    incomment = 0; 
    56    buffer_len = 0; 
    67} 
     8 
     9# multiline comment handling 
     10{ 
     11    # removes one line comment 
     12    gsub(/\/\*(.+?)\*\//, " "); 
     13} 
     14/\*\// { 
     15    if (incomment) { 
     16        sub(/.*\*\//, ""); 
     17        incomment = 0; 
     18    } 
     19} 
     20incomment { 
     21    next; 
     22} 
     23/\/\*/ { 
     24    sub(/\/\*.*/, ""); 
     25    incomment = 1; 
     26    # fall through 
     27} 
     28 
     29# skip file/line mark here to be faster 
     30/^#/ { 
     31    next; 
     32} 
     33 
    734/^}.*;/ { 
    835    if (instruct) { 
     
    5178{ 
    5279    if (brace == 1 && instruct) { 
     80        gsub(/(^[\t ]+|[\t ]+$)/, ""); # trim whitespaces 
    5381        sub(/.*[{}]/, ""); 
    5482        gsub(/\[[^\]]+\]/, ""); # ignore [...] 
     
    6391        } 
    6492        else { 
     93            # process normal variables 
     94 
    6595            # ignore any ()s 
    6696            while (gsub(/(\([^)]*\))/, "")) { 
     
    6999                next; 
    70100            } 
     101            # unsigned int *a,  b; int c; 
    71102            gsub(/[*]/, " "); 
     103            # unsigned int a,  b; int c; 
    72104            gsub(/ +/, " "); 
     105            # unsigned int a, b; int c; 
    73106            gsub(/ *[,;]/, ";"); 
     107            # unsigned int a; b; int c; 
    74108            if (!match($0, /;/)) { 
    75109                next; 
    76110            } 
     111            # print "=DEBUG=" $0 "=="; 
    77112            split($0, chunks, ";"); 
    78             # get var of "int *var, var;" etc 
    79             for (i in chunks) { 
     113            # [unsigned int a, b, c] 
     114 
     115            for (i = 1; i in chunks; i ++) { 
    80116                if (chunks[i] == "") { 
    81117                    delete chunks[i]; 
     
    83119                } 
    84120                split(chunks[i], pieces, " "); 
     121                # [unsigned, int, a] 
     122                # [b] 
     123                # [c] 
    85124 
    86                 for (j in pieces) { 
     125                last_piece = ""; 
     126                for (j = 1; j in pieces; j ++) { 
    87127                    last_piece = pieces[j]; 
    88                     delete pieces[i]; 
     128                    delete pieces[j]; 
    89129                } 
    90130                if (last_piece == "") { 
    91                     print "=====" chunks[i]; 
     131                    # print "=ERROR=" chunks[i] "=="; 
     132                    delete chunks[i]; 
     133                    continue; 
    92134                } 
     135                # a 
     136                # b 
     137                # c 
     138 
    93139                buffer[buffer_len] = last_piece; 
    94140                buffer_len ++; 
    95                 delete chunks[i]; 
     141                delete chunks[i] 
    96142            } 
     143            last_piece = ""; 
    97144        } 
    98145        next; 
     
    105152    next; 
    106153} 
    107 /^typedef struct .*\{/ { 
     154/^typedef struct .*\{[^}]*$/ { 
    108155    brace = 1; 
    109156    instruct = 1; 
  • branches/1.1/mmap.c

    r148 r255  
    8585{ 
    8686    if (shm->diff) { 
    87         assert(xc_mmap_is_readonly(p)); 
     87        assert(xc_mmap_is_readonly(shm, p)); 
    8888        p = PTR_SUB(p, shm->diff); 
    8989    } 
    90     assert(xc_mmap_is_readwrite(p)); 
     90    assert(xc_mmap_is_readwrite(shm, p)); 
    9191    return p; 
    9292} 
     
    9494static XC_SHM_TO_READONLY(xc_mmap_to_readonly) /* {{{ */ 
    9595{ 
    96     assert(xc_shm_is_readwrite(p)); 
     96    assert(xc_mmap_is_readwrite(shm, p)); 
    9797    if (shm->diff) { 
    9898        p = PTR_ADD(p, shm->diff); 
    99         assert(xc_mmap_is_readonly(p)); 
     99        assert(xc_mmap_is_readonly(shm, p)); 
    100100    } 
    101101    return p; 
  • branches/1.1/processor/head.m4

    r148 r255  
    5454#define MAX_DUP_STR_LEN 256 
    5555dnl }}} 
    56 /* export: typedef struct _processor_t processor_t; :export {{{ */ 
    57 struct _processor_t { 
     56/* export: typedef struct _xc_processor_t xc_processor_t; :export {{{ */ 
     57struct _xc_processor_t { 
    5858    char *p; 
    5959    zend_uint size; 
     
    117117/* {{{ xc_calc_string_n */ 
    118118REDEF(`KIND', `calc') 
    119 static inline void xc_calc_string_n(processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) { 
     119static inline void xc_calc_string_n(xc_processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) { 
    120120    pushdef(`__LINE__', `relayline') 
    121121    int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size); 
     
    139139/* {{{ xc_store_string_n */ 
    140140REDEF(`KIND', `store') 
    141 static inline zstr xc_store_string_n(processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) { 
     141static inline zstr xc_store_string_n(xc_processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) { 
    142142    pushdef(`__LINE__', `relayline') 
    143143    int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size); 
     
    166166 * return class_index + 1 
    167167 */ 
    168 static zend_ulong xc_get_class_num(processor_t *processor, zend_class_entry *ce) { 
     168static zend_ulong xc_get_class_num(xc_processor_t *processor, zend_class_entry *ce) { 
    169169    zend_ulong i; 
    170170    const xc_entry_t *xce = processor->xce_src; 
     
    188188/* {{{ xc_get_class */ 
    189189#ifdef ZEND_ENGINE_2 
    190 static zend_class_entry *xc_get_class(processor_t *processor, zend_ulong class_num) { 
     190static zend_class_entry *xc_get_class(xc_processor_t *processor, zend_ulong class_num) { 
    191191    /* must be parent or currrent class */ 
    192192    assert(class_num <= processor->active_class_num); 
     
    197197#ifdef ZEND_ENGINE_2 
    198198/* fix method on store */ 
    199 static void xc_fix_method(processor_t *processor, zend_op_array *dst) /* {{{ */ 
     199static void xc_fix_method(xc_processor_t *processor, zend_op_array *dst) /* {{{ */ 
    200200{ 
    201201    zend_function *zf = (zend_function *) dst; 
     
    251251xc_entry_t *xc_processor_store_xc_entry_t(xc_entry_t *src TSRMLS_DC) { 
    252252    xc_entry_t *dst; 
    253     processor_t processor; 
     253    xc_processor_t processor; 
    254254 
    255255    memset(&processor, 0, sizeof(processor)); 
     
    324324/* export: xc_entry_t *xc_processor_restore_xc_entry_t(xc_entry_t *dst, const xc_entry_t *src, zend_bool readonly_protection TSRMLS_DC); :export {{{ */ 
    325325xc_entry_t *xc_processor_restore_xc_entry_t(xc_entry_t *dst, const xc_entry_t *src, zend_bool readonly_protection TSRMLS_DC) { 
    326     processor_t processor; 
     326    xc_processor_t processor; 
    327327 
    328328    memset(&processor, 0, sizeof(processor)); 
     
    335335/* export: zval *xc_processor_restore_zval(zval *dst, const zval *src TSRMLS_DC); :export {{{ */ 
    336336zval *xc_processor_restore_zval(zval *dst, const zval *src TSRMLS_DC) { 
    337     processor_t processor; 
     337    xc_processor_t processor; 
    338338 
    339339    memset(&processor, 0, sizeof(processor)); 
  • branches/1.1/processor/processor.m4

    r253 r255  
    5656dnl {{{ zend_brk_cont_element 
    5757DEF_STRUCT_P_FUNC(`zend_brk_cont_element', , ` 
     58#ifdef ZEND_ENGINE_2_2 
     59    DISPATCH(int, start) 
     60#endif 
    5861    DISPATCH(int, cont) 
    5962    DISPATCH(int, brk) 
  • branches/1.1/processor/struct.m4

    r93 r255  
    99    FUNC_NAME`'( 
    1010        IFDPRINT( `const $1 * const src, int indent') 
    11         IFCALC(   `processor_t *processor, const $1 * const src') 
    12         IFSTORE(  `processor_t *processor, $1 *dst, const $1 * const src') 
    13         IFRESTORE(`processor_t *processor, $1 *dst, const $1 * const src') 
     11        IFCALC(   `xc_processor_t *processor, const $1 * const src') 
     12        IFSTORE(  `xc_processor_t *processor, $1 *dst, const $1 * const src') 
     13        IFRESTORE(`xc_processor_t *processor, $1 *dst, const $1 * const src') 
    1414        IFDASM(   `zval *dst, const $1 * const src') 
    1515        IFASM(    `$1 *dst, const $1 * const src') 
  • branches/1.1/xcache-zh-gb2312.ini

    r149 r255  
    2020[xcache] 
    2121; ÕâÀïµÄ¶àÊýÑ¡Ïî½öÔÚ ini Àï¿ÉÒÔÐÞ¸Ä, ÕâÀïÁгöµÄ¶¼ÊÇĬÈÏÖµ, ³ý·ÇÁíÍâ˵Ã÷ 
     22 
     23; select low level shm/allocator scheme implemenation 
     24xcache.shm_scheme =        "mmap" 
    2225; ½ûÓÃ: xcache.size=0 
    23 ; ÆôÓÃ: xcache.size=ÈÎÒâ>0µÄÖµ, ͬʱÇë×¢ÒâÄúµÄϵͳ mmap ÉÏÏÞ 
    24 xcache.size =                  0 
     26; ÆôÓÃ: xcache.size=64M Ö®Àà (ÈÎÒâ>0µÄÖµ) ͬʱÇë×¢ÒâÄúµÄϵͳ mmap ÉÏÏÞ 
     27xcache.size  =                0M 
    2528; ½¨ÒéÉèÖÃΪ cpu Êý (cat /proc/cpuinfo |grep -c processor) 
    2629xcache.count =                 1 
     
    3336 
    3437; ͬÉÏ, Ö»ÊÇÕë¶Ô±äÁ¿»º´æÉèÖà
    35 xcache.var_size  =             0 
     38xcache.var_size  =            0M 
    3639xcache.var_count =             1 
    3740xcache.var_slots =            8K 
     
    5962 
    6063xcache.cacher =               On 
     64xcache.stat   =               On 
    6165xcache.optimizer =           Off 
    6266 
  • branches/1.1/xcache.ini

    r127 r255  
    22;; install as zend extension (recommended), normally "$extension_dir/xcache.so" 
    33zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so 
     4; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so 
    45;; For windows users, replace xcache.so with php_xcache.dll 
    56zend_extension_ts = c:/php/extensions/php_xcache.dll 
     
    1920[xcache] 
    2021; ini only settings, all the values here is default unless explained 
     22 
     23; select low level shm/allocator scheme implemenation 
     24xcache.shm_scheme =        "mmap" 
    2125; to disable: xcache.size=0 
    22 ; to enable : xcache.size=any size > 0 and your system mmap allows 
    23 xcache.size =                  0 
     26; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows 
     27xcache.size  =                0M 
    2428; set to cpu count (cat /proc/cpuinfo |grep -c processor) 
    2529xcache.count =                 1 
     
    3236 
    3337; same as aboves but for variable cache 
    34 xcache.var_size  =             0 
     38xcache.var_size  =            0M 
    3539xcache.var_count =             1 
    3640xcache.var_slots =            8K 
Note: See TracChangeset for help on using the changeset viewer.