Move GetUsername and GetGroupname to HostInfoPosix

llvm-svn: 216210
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index dc99a99..bdece3d 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -1538,19 +1538,21 @@
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServer::Handle_qUserName (StringExtractorGDBRemote &packet)
 {
+#if !defined(LLDB_DISABLE_POSIX)
     // Packet format: "qUserName:%i" where %i is the uid
     packet.SetFilePos(::strlen ("qUserName:"));
     uint32_t uid = packet.GetU32 (UINT32_MAX);
     if (uid != UINT32_MAX)
     {
         std::string name;
-        if (Host::GetUserName (uid, name))
+        if (HostInfo::LookupUserName(uid, name))
         {
             StreamString response;
             response.PutCStringAsRawHex8 (name.c_str());
             return SendPacketNoLock (response.GetData(), response.GetSize());
         }
     }
+#endif
     return SendErrorResponse (5);
 
 }
@@ -1558,19 +1560,21 @@
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServer::Handle_qGroupName (StringExtractorGDBRemote &packet)
 {
+#if !defined(LLDB_DISABLE_POSIX)
     // Packet format: "qGroupName:%i" where %i is the gid
     packet.SetFilePos(::strlen ("qGroupName:"));
     uint32_t gid = packet.GetU32 (UINT32_MAX);
     if (gid != UINT32_MAX)
     {
         std::string name;
-        if (Host::GetGroupName (gid, name))
+        if (HostInfo::LookupGroupName(gid, name))
         {
             StreamString response;
             response.PutCStringAsRawHex8 (name.c_str());
             return SendPacketNoLock (response.GetData(), response.GetSize());
         }
     }
+#endif
     return SendErrorResponse (6);
 }