From 19f70e2fa2e3ef4a69142734ac00e1ccd7453db0 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. llvm-svn: 21405 --- lib/Bytecode/Archive/Archive.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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();