pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.125 2000/08/22 02:15:46 mast Exp $ +  * $Id: master.pike.in,v 1.126 2000/08/27 18:29:26 mirar Exp $    *    * Master-file for Pike.    *    * Based on master.pike 1.67.    */      // Some configurable parameters useful for debugging      #define PIKE_AUTORELOAD   
pike.git/lib/master.pike.in:175:    return combine_path(IS_ABSOLUTE_PATH(path)?"/":getcwd(),path);   }      #ifdef FILE_STAT_CACHE      #define FILE_STAT_CACHE_TIME 20      int invalidate_time;   mapping(string:multiset(string)) dir_cache = ([]);    - array master_file_stat(string x) + #define Stat _static_modules.files.Stat + Stat master_file_stat(string x)   {    string file, dir=combine_path_with_cwd(x);       file=BASENAME(dir);    dir=DIRNAME(dir);       multiset(string) d;    if(time() > invalidate_time)    {    dir_cache=([]);
pike.git/lib/master.pike.in:315:   }      #if constant(_static_modules.Builtin.mutex)   #define THREADED   object compilation_mutex = _static_modules.Builtin()->mutex();   #endif      static program low_findprog(string pname, string ext, object|void handler)   {    program ret; -  array s; +  Stat s;    string fname=pname+ext;      #ifdef THREADED    object key;    // FIXME: The catch is needed, since we might be called in    // a context when threads are disabled.    // (compile() disables threads).    mixed err = catch {    key=compilation_mutex->lock(2);    };
pike.git/lib/master.pike.in:368:   #ifdef PIKE_AUTORELOAD    if (load_time[fname] > s[3])    if (!zero_type (ret=programs[fname])) return ret;   #endif       switch(ext)    {    case "":    case ".pike":    foreach(query_precompiled_names(fname), string oname) { -  if(array s2=master_file_stat(fakeroot(oname))) +  if(Stat s2=master_file_stat(fakeroot(oname)))    {    if(s2[1]>=0 && s2[3]>=s[3])    {    mixed err=catch {    AUTORELOAD_CHECK_FILE(oname);    return programs[fname] =    decode_value(master_read_file(oname),    Codec());    };    if (handler) {
pike.git/lib/master.pike.in:866:      object findmodule(string fullname)   {    array stat;    object o;    if(!zero_type(o=fc[fullname]))    {    return o;    }    -  if(array stat=master_file_stat(fakeroot(fullname+".pmod"))) +  if(Stat stat=master_file_stat(fakeroot(fullname+".pmod")))    {    if(stat[1]==-2)    return fc[fullname]=dirnode(fullname+".pmod");    }       if(o=low_cast_to_object(fullname+".pmod","/."))    return fc[fullname]=o;      #if constant(load_module)    if(master_file_stat(fakeroot(fullname+".so")))