mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Initialize fields mode, uid, and gid.
Patch by Markus Oberhumer. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21369 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
72a9caa260
commit
4b2afe6394
@ -318,6 +318,12 @@ Archive::writeSymbolTable(std::ofstream& ARFile) {
|
||||
memcpy(Hdr.name,ARFILE_LLVM_SYMTAB_NAME,16);
|
||||
uint64_t secondsSinceEpoch = sys::TimeValue::now().toEpochTime();
|
||||
char buffer[32];
|
||||
sprintf(buffer, "%-8o", 0644);
|
||||
memcpy(Hdr.mode,buffer,8);
|
||||
sprintf(buffer, "%-6u", getuid());
|
||||
memcpy(Hdr.uid,buffer,6);
|
||||
sprintf(buffer, "%-6u", getgid());
|
||||
memcpy(Hdr.gid,buffer,6);
|
||||
sprintf(buffer,"%-12u", unsigned(secondsSinceEpoch));
|
||||
memcpy(Hdr.date,buffer,12);
|
||||
sprintf(buffer,"%-10u",symTabSize);
|
||||
|
@ -318,6 +318,12 @@ Archive::writeSymbolTable(std::ofstream& ARFile) {
|
||||
memcpy(Hdr.name,ARFILE_LLVM_SYMTAB_NAME,16);
|
||||
uint64_t secondsSinceEpoch = sys::TimeValue::now().toEpochTime();
|
||||
char buffer[32];
|
||||
sprintf(buffer, "%-8o", 0644);
|
||||
memcpy(Hdr.mode,buffer,8);
|
||||
sprintf(buffer, "%-6u", getuid());
|
||||
memcpy(Hdr.uid,buffer,6);
|
||||
sprintf(buffer, "%-6u", getgid());
|
||||
memcpy(Hdr.gid,buffer,6);
|
||||
sprintf(buffer,"%-12u", unsigned(secondsSinceEpoch));
|
||||
memcpy(Hdr.date,buffer,12);
|
||||
sprintf(buffer,"%-10u",symTabSize);
|
||||
|
Loading…
Reference in New Issue
Block a user