pike.git / lib / modules / System.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/System.pmod/module.pmod:15:   //! @returns   //! the username of the user "associated" with the current process, or zero   //! if a method to find this information does not exist on the current system.   //!   //! @note   //! On NT systems, this returns the user the current thread is running as,   //! while on Unix-like systems this function returns the user that started   //! the process (rather than the effective user)..   string get_user()   { - #if constant(System.GetUserName) -  return System.GetUserName(); + #if constant(_system.GetUserName) +  return GetUserName();   #elseif constant(getuid)    return [string]getpwuid(getuid())[0];   #else    return 0;   #endif   }      //! Get the full path for the current user's home directory   //!   //! @returns
pike.git/lib/modules/System.pmod/module.pmod:48: Inside #if __NT__
  #if __NT__    string homedrive = [string]getenv("HOMEDRIVE");    home = [string]getenv("HOMEPATH");    if(homedrive)    home = combine_path(homedrive + "\\", (home||"\\"));    if(home) return home;   #endif       return 0;   } -  +