Changeset 160 for branches/1.0/xcache.c


Ignore:
Timestamp:
2006-09-13T02:48:01+02:00 (8 years ago)
Author:
moo
Message:

fix for win32

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/xcache.c

    r143 r160  
    504504} 
    505505/* }}} */ 
    506 static int xc_entry_init_key_php(xc_entry_t *xce, char *filename TSRMLS_DC) /* {{{ */ 
     506static int xc_entry_init_key_php(xc_entry_t *xce, char *filename, char *opened_path_buffer TSRMLS_DC) /* {{{ */ 
    507507{ 
    508508    struct stat buf, *pbuf; 
     
    540540        return 0; 
    541541    } 
     542 
     543#ifndef HAVE_INODE 
     544    /* hash on filename, let's expand it to real path */ 
     545    filename = expand_filepath(filename, opened_path_buffer TSRMLS_CC); 
     546    if (filename == NULL) { 
     547        return 0; 
     548    } 
     549#endif 
    542550 
    543551    UNISW(NOTHING, xce->name_type = IS_STRING;) 
     
    574582    zend_bool catched = 0; 
    575583    char *filename; 
     584    char opened_path_buffer[MAXPATHLEN]; 
    576585 
    577586    if (!xc_initized) { 
     
    598607    filename = h->opened_path ? h->opened_path : h->filename; 
    599608    xce.data.php = &php; 
    600     if (!xc_entry_init_key_php(&xce, filename TSRMLS_CC)) { 
     609    if (!xc_entry_init_key_php(&xce, filename, opened_path_buffer TSRMLS_CC)) { 
    601610        return origin_compile_file(h, type TSRMLS_CC); 
    602611    } 
     
    670679 
    671680    filename = h->opened_path ? h->opened_path : h->filename; 
     681#ifdef HAVE_INODE 
    672682    if (xce.name.str.val != filename) { 
    673683        xce.name.str.val = filename; 
    674684        xce.name.str.len = strlen(filename); 
    675685    } 
     686#endif 
    676687 
    677688#ifdef HAVE_XCACHE_OPTIMIZER 
Note: See TracChangeset for help on using the changeset viewer.