OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 BASE_PLATFORM_FILE_H_ | 5 #ifndef BASE_PLATFORM_FILE_H_ |
6 #define BASE_PLATFORM_FILE_H_ | 6 #define BASE_PLATFORM_FILE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
11 #include <windows.h> | 11 #include <windows.h> |
12 #endif | 12 #endif |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/base_api.h" | 16 #include "base/base_api.h" |
17 #include "base/basictypes.h" | 17 #include "base/basictypes.h" |
18 #include "base/file_path.h" | 18 #include "base/file_path.h" |
19 #include "base/time.h" | 19 #include "base/time.h" |
20 | 20 |
21 #if defined(OS_ANDROID) | |
22 // Not implemented in Bionic. See platform_file_android.cc. | |
23 extern "C" int futimes(int fd, const struct timeval tv[2]); | |
24 | |
25 // The prototype of mkdtemp is missing. | |
26 extern "C" char* mkdtemp(char* path); | |
joth
2011/06/17 11:25:54
could we just put these declarations in the .cc th
michaelbai
2011/06/17 22:41:29
Done.
| |
27 #endif // OS_ANDROID | |
28 | |
21 namespace base { | 29 namespace base { |
22 | 30 |
23 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
24 typedef HANDLE PlatformFile; | 32 typedef HANDLE PlatformFile; |
25 const PlatformFile kInvalidPlatformFileValue = INVALID_HANDLE_VALUE; | 33 const PlatformFile kInvalidPlatformFileValue = INVALID_HANDLE_VALUE; |
26 #elif defined(OS_POSIX) | 34 #elif defined(OS_POSIX) |
27 typedef int PlatformFile; | 35 typedef int PlatformFile; |
28 const PlatformFile kInvalidPlatformFileValue = -1; | 36 const PlatformFile kInvalidPlatformFileValue = -1; |
29 #endif | 37 #endif |
30 | 38 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 return temp; | 182 return temp; |
175 } | 183 } |
176 | 184 |
177 private: | 185 private: |
178 PlatformFile* value_; | 186 PlatformFile* value_; |
179 }; | 187 }; |
180 | 188 |
181 } // namespace base | 189 } // namespace base |
182 | 190 |
183 #endif // BASE_PLATFORM_FILE_H_ | 191 #endif // BASE_PLATFORM_FILE_H_ |
OLD | NEW |