1 //===-- HostInfoPosix.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_Host_posix_HostInfoPosix_h_
11 #define lldb_Host_posix_HostInfoPosix_h_
13 #include "lldb/Host/FileSpec.h"
14 #include "lldb/Host/HostInfoBase.h"
16 namespace lldb_private {
18 class HostInfoPosix : public HostInfoBase {
19 friend class HostInfoBase;
22 static size_t GetPageSize();
23 static bool GetHostname(std::string &s);
24 static const char *LookupUserName(uint32_t uid, std::string &user_name);
25 static const char *LookupGroupName(uint32_t gid, std::string &group_name);
27 static uint32_t GetUserID();
28 static uint32_t GetGroupID();
29 static uint32_t GetEffectiveUserID();
30 static uint32_t GetEffectiveGroupID();
32 static FileSpec GetDefaultShell();
34 static bool GetEnvironmentVar(const std::string &var_name, std::string &var);
37 static bool ComputeSupportExeDirectory(FileSpec &file_spec);
38 static bool ComputeHeaderDirectory(FileSpec &file_spec);
39 static bool ComputePythonDirectory(FileSpec &file_spec);
40 static bool ComputeClangDirectory(FileSpec &file_spec);
41 static bool ComputePathRelativeToLibrary(FileSpec &file_spec,