[llvm-commits] CVS: llvm/tools/gccas/gccas.cpp
Jeff Cohen
jeffc at jolt-lang.org
Sat Jan 22 09:36:30 PST 2005
Changes in directory llvm/tools/gccas:
gccas.cpp updated: 1.107 -> 1.108
---
Log message:
Use binary mode for reading/writing bytecode files
---
Diffs of the changes: (+4 -1)
gccas.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/tools/gccas/gccas.cpp
diff -u llvm/tools/gccas/gccas.cpp:1.107 llvm/tools/gccas/gccas.cpp:1.108
--- llvm/tools/gccas/gccas.cpp:1.107 Sat Jan 1 16:10:32 2005
+++ llvm/tools/gccas/gccas.cpp Sat Jan 22 11:36:16 2005
@@ -164,9 +164,12 @@
}
if (OutputFilename == "-")
+ // FIXME: cout is not binary!
Out = &std::cout;
else {
- Out = new std::ofstream(OutputFilename.c_str(), std::ios::out);
+ std::ios::openmode io_mode = std::ios::out | std::ios::trunc |
+ std::ios::binary;
+ Out = new std::ofstream(OutputFilename.c_str(), io_mode);
// Make sure that the Out file gets unlinked from the disk if we get a
// signal
More information about the llvm-commits
mailing list