From 8e827e866176621a60f11340fd44401a0d594de7 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 21 Apr 2005 17:49:57 +0000 Subject: [PATCH] Use the actual uid/gid for defaulting the fields in the archive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21405 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Archive/Archive.cpp | 5 +++-- lib/Bytecode/Archive/Archive.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp index aa2db413852..cb8bd2dbfdd 100644 --- a/lib/Archive/Archive.cpp +++ b/lib/Archive/Archive.cpp @@ -14,6 +14,7 @@ #include "ArchiveInternals.h" #include "llvm/ModuleProvider.h" +#include "llvm/System/Process.h" using namespace llvm; @@ -40,8 +41,8 @@ ArchiveMember::getMemberSize() const { ArchiveMember::ArchiveMember() : next(0), prev(0), parent(0), path(""), flags(0), data(0) { - info.user = 1000; - info.group = 1000; + info.user = sys::Process::GetCurrentUserId(); + info.group = sys::Process::GetCurrentGroupId(); info.mode = 0777; info.fileSize = 0; info.modTime = sys::TimeValue::now(); diff --git a/lib/Bytecode/Archive/Archive.cpp b/lib/Bytecode/Archive/Archive.cpp index aa2db413852..cb8bd2dbfdd 100644 --- a/lib/Bytecode/Archive/Archive.cpp +++ b/lib/Bytecode/Archive/Archive.cpp @@ -14,6 +14,7 @@ #include "ArchiveInternals.h" #include "llvm/ModuleProvider.h" +#include "llvm/System/Process.h" using namespace llvm; @@ -40,8 +41,8 @@ ArchiveMember::getMemberSize() const { ArchiveMember::ArchiveMember() : next(0), prev(0), parent(0), path(""), flags(0), data(0) { - info.user = 1000; - info.group = 1000; + info.user = sys::Process::GetCurrentUserId(); + info.group = sys::Process::GetCurrentGroupId(); info.mode = 0777; info.fileSize = 0; info.modTime = sys::TimeValue::now();