OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef OTS_FILE_STREAM_H_ | 5 #ifndef OTS_FILE_STREAM_H_ |
6 #define OTS_FILE_STREAM_H_ | 6 #define OTS_FILE_STREAM_H_ |
7 | 7 |
8 #include "opentype-sanitiser.h" | 8 #include "opentype-sanitiser.h" |
9 | 9 |
10 namespace ots { | 10 namespace ots { |
(...skipping 20 matching lines...) Expand all Loading... |
31 #if defined(_WIN32) | 31 #if defined(_WIN32) |
32 if (!::_fseeki64(file_, position, SEEK_SET)) { | 32 if (!::_fseeki64(file_, position, SEEK_SET)) { |
33 position_ = position; | 33 position_ = position; |
34 return true; | 34 return true; |
35 } | 35 } |
36 #else | 36 #else |
37 if (!::fseeko(file_, position, SEEK_SET)) { | 37 if (!::fseeko(file_, position, SEEK_SET)) { |
38 position_ = position; | 38 position_ = position; |
39 return true; | 39 return true; |
40 } | 40 } |
| 41 #endif // defined(_WIN32) |
41 return false; | 42 return false; |
42 #endif // defined(_WIN32) | |
43 } | 43 } |
44 | 44 |
45 off_t Tell() const { | 45 off_t Tell() const { |
46 return position_; | 46 return position_; |
47 } | 47 } |
48 | 48 |
49 private: | 49 private: |
50 FILE * const file_; | 50 FILE * const file_; |
51 off_t position_; | 51 off_t position_; |
52 }; | 52 }; |
53 | 53 |
54 } // namespace ots | 54 } // namespace ots |
55 | 55 |
56 #endif // OTS_FILE_STREAM_H_ | 56 #endif // OTS_FILE_STREAM_H_ |
OLD | NEW |