Branch: Tag:

2004-03-22

2004-03-22 22:35:27 by Martin Stjernholm <mast@lysator.liu.se>

Fixed bug in the previous checkin. Added a magic constant
this_program_does_not_exist that programs can define if they don't
want to exist. Useful together with #if constant(...) in modules that
shouldn't exist when some module they depend on doesn't.

Rev: lib/master.pike.in:1.338

6:   // Pike is distributed under GPL, LGPL and MPL. See the file COPYING   // for more information.   // - // $Id: master.pike.in,v 1.337 2004/03/22 17:42:06 mast Exp $ + // $Id: master.pike.in,v 1.338 2004/03/22 22:35:27 mast Exp $      #pike __REAL_VERSION__   //#pragma strict_types
844:    // from dlerror(3) doesn't allow us to tell those from other    // errors.    call_compile_warning (handler, fname, -  "Failed to load library: %s\n", err->__dlerror); +  "Failed to load library: %s\n", err->dlerror);    else    compile_cb_rethrow (err);    }
855:       AUTORELOAD_FINISH(ret,programs,fname);    +  if (ret && ret->this_program_does_not_exist) { +  resolv_debug ("low_findprog %s: program says it doesn't exist\n", fname); +  return programs[fname] = 0; +  } +  else {    resolv_debug("low_findprog %s: returning %O\n", fname, ret); -  +     return programs[fname]=ret;    } -  +  } +     resolv_debug ("low_findprog %s: file not found\n", fname);    return 0;   }