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
This commit is contained in:
Reid Spencer 2005-04-21 17:49:57 +00:00
parent cb2d1a2dc2
commit 8e827e8661
2 changed files with 6 additions and 4 deletions

View File

@ -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("<invalid>"), 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();

View File

@ -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("<invalid>"), 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();