[llvm] r289184 - Support: Use a 64-bit seek in raw_fd_ostream::seek().
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 8 20:57:19 PST 2016
Author: pcc
Date: Thu Dec 8 22:57:19 2016
New Revision: 289184
URL: http://llvm.org/viewvc/llvm-project?rev=289184&view=rev
Log:
Support: Use a 64-bit seek in raw_fd_ostream::seek().
Modified:
llvm/trunk/lib/Support/raw_ostream.cpp
Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=289184&r1=289183&r2=289184&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Thu Dec 8 22:57:19 2016
@@ -598,7 +598,11 @@ void raw_fd_ostream::close() {
uint64_t raw_fd_ostream::seek(uint64_t off) {
assert(SupportsSeeking && "Stream does not support seeking!");
flush();
- pos = ::lseek(FD, off, SEEK_SET);
+#ifdef LLVM_ON_WIN32
+ pos = ::_lseeki64(FD, off, SEEK_SET);
+#else
+ pos = ::lseek64(FD, off, SEEK_SET);
+#endif
if (pos == (uint64_t)-1)
error_detected();
return pos;
More information about the llvm-commits
mailing list