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

Side by Side Diff: runtime/bin/file_win.cc

Issue 8488007: Fix Windows build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <fcntl.h> 5 #include <fcntl.h>
6 #include <io.h> 6 #include <io.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string.h> 8 #include <string.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return write(handle_->fd(), buffer, num_bytes); 62 return write(handle_->fd(), buffer, num_bytes);
63 } 63 }
64 64
65 65
66 off_t File::Position() { 66 off_t File::Position() {
67 ASSERT(handle_->fd() >= 0); 67 ASSERT(handle_->fd() >= 0);
68 return lseek(handle_->fd(), 0, SEEK_CUR); 68 return lseek(handle_->fd(), 0, SEEK_CUR);
69 } 69 }
70 70
71 71
72 off_t File::Position(int64_t position) { 72 off_t File::SetPosition(int64_t position) {
73 ASSERT(handle_->fd() >= 0); 73 ASSERT(handle_->fd() >= 0);
74 return lseek(handle_->fd(), position, SEEK_SET); 74 return lseek(handle_->fd(), position, SEEK_SET);
75 } 75 }
76 76
77 77
78 void File::Flush() { 78 void File::Flush() {
79 ASSERT(handle_->fd()); 79 ASSERT(handle_->fd());
80 _commit(handle_->fd()); 80 _commit(handle_->fd());
81 } 81 }
82 82
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 146
147 const char* File::PathSeparator() { 147 const char* File::PathSeparator() {
148 return "\\"; 148 return "\\";
149 } 149 }
150 150
151 151
152 const char* File::StringEscapedPathSeparator() { 152 const char* File::StringEscapedPathSeparator() {
153 return "\\\\"; 153 return "\\\\";
154 } 154 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698