[llvm-commits] CVS: llvm/lib/Bytecode/Archive/ArchiveWriter.cpp
Misha Brukman
brukman at cs.uiuc.edu
Tue Apr 19 20:55:46 PDT 2005
Changes in directory llvm/lib/Bytecode/Archive:
ArchiveWriter.cpp updated: 1.15 -> 1.16
---
Log message:
Initialize fields mode, uid, and gid.
Patch by Markus Oberhumer. Thanks!
---
Diffs of the changes: (+6 -0)
ArchiveWriter.cpp | 6 ++++++
1 files changed, 6 insertions(+)
Index: llvm/lib/Bytecode/Archive/ArchiveWriter.cpp
diff -u llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.15 llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.16
--- llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.15 Thu Jan 27 19:17:07 2005
+++ llvm/lib/Bytecode/Archive/ArchiveWriter.cpp Tue Apr 19 22:55:35 2005
@@ -318,6 +318,12 @@
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);
More information about the llvm-commits
mailing list