Branch: Tag:

2014-03-11

2014-03-11 15:00:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Use #if constant() instead of #if efun().

will warn about its use.

174:      protected class Privs   { - #if efun(seteuid) + #if constant(seteuid)       int saved_uid;    int saved_gid;
284: Inside #if defined(HAVE_EFFECTIVE_USER)
   (string)dbt(backtrace()[-2]));       if (u[2]) { - #if efun(cleargroups) + #if constant(cleargroups)    if (mixed err = catch { cleargroups(); })    master()->handle_error (err);   #endif /* cleargroups */ - #if efun(initgroups) + #if constant(initgroups)    if (mixed err = catch { initgroups(u[0], u[3]); })    master()->handle_error (err);   #endif
403: Inside #if defined(HAVE_EFFECTIVE_USER)
      seteuid(0);    array u = getpwuid(saved_uid); - #if efun(cleargroups) + #if constant(cleargroups)    if (mixed err = catch { cleargroups(); })    master()->handle_error (err);   #endif /* cleargroups */
416:    enable_coredumps(1);   #endif /* HAVE_EFFECTIVE_USER */    } - #else /* efun(seteuid) */ + #else /* constant(seteuid) */    void create(string reason, int|string|void uid, int|string|void gid){} - #endif /* efun(seteuid) */ + #endif /* constant(seteuid) */   }      /* Used by read_config.pike, since there seems to be problems with
5669: Inside #if undefined(__NT__)
   if(!chroot(to))    {    report_debug("Roxen: Cannot chroot to "+to+": "); - #if efun(real_perror) + #if constant(real_perror)    real_perror();   #endif    return;
5727:    Stdio.File|void to2,    function(:void)|void callback)   { - #if efun(spider.shuffle) + #if constant(spider.shuffle)    if(!to2)    {    object p = fastpipe( );
5744:    if(to2) p->output(to2);    p->input(from);    return p; - #if efun(spider.shuffle) + #if constant(spider.shuffle)    }   #endif   }
6083:    cache_clear_deltas();    set_locale();    - #if efun(syslog) + #if constant(syslog)    init_logger();   #endif    init_garber();