Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: runtime/bin/file_win.cc

Issue 63363010: Add support for working with large files, in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/file_win.cc
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index 8e0f6157157ecec66e600990691f647515e833a4..d8c471c3fbc3fc3193d70f49ace94fe5bdd50ca7 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -72,19 +72,19 @@ int64_t File::Write(const void* buffer, int64_t num_bytes) {
}
-off_t File::Position() {
+off64_t File::Position() {
ASSERT(handle_->fd() >= 0);
return lseek(handle_->fd(), 0, SEEK_CUR);
Søren Gjesse 2013/11/19 10:15:49 Looking in the Windows docs (http://msdn.microsoft
Anders Johnsen 2013/11/19 10:43:39 Done.
}
-bool File::SetPosition(int64_t position) {
+bool File::SetPosition(off64_t position) {
ASSERT(handle_->fd() >= 0);
return (lseek(handle_->fd(), position, SEEK_SET) != -1);
Søren Gjesse 2013/11/19 10:15:49 ditto
Anders Johnsen 2013/11/19 10:43:39 Done.
}
-bool File::Truncate(int64_t length) {
+bool File::Truncate(off64_t length) {
ASSERT(handle_->fd() >= 0);
return (chsize(handle_->fd(), length) != -1);
Søren Gjesse 2013/11/19 10:15:49 Use _chsize_s here (http://msdn.microsoft.com/en-u
Anders Johnsen 2013/11/19 10:43:39 Done.
}
@@ -96,7 +96,7 @@ bool File::Flush() {
}
-off_t File::Length() {
+off64_t File::Length() {
ASSERT(handle_->fd() >= 0);
struct stat st;
if (fstat(handle_->fd(), &st) == 0) {
Søren Gjesse 2013/11/19 10:15:49 And _fstat64 (http://msdn.microsoft.com/en-us/libr
Anders Johnsen 2013/11/19 10:43:39 Done.
@@ -322,7 +322,7 @@ bool File::RenameLink(const char* old_path, const char* new_path) {
}
-off_t File::LengthFromPath(const char* name) {
+off64_t File::LengthFromPath(const char* name) {
struct _stat st;
const wchar_t* system_name = StringUtils::Utf8ToWide(name);
int stat_status = _wstat(system_name, &st);
Søren Gjesse 2013/11/19 10:15:49 _wstat64
Anders Johnsen 2013/11/19 10:43:39 Done.

Powered by Google App Engine
This is Rietveld 408576698