OLD | NEW |
1 // Copyright (c) 2011 The LevelDB Authors. All rights reserved. | 1 // Copyright (c) 2011 The LevelDB 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. See the AUTHORS file for names of contributors. | 3 // found in the LICENSE file. See the AUTHORS file for names of contributors. |
4 | 4 |
5 #include <deque> | 5 #include <deque> |
6 #include <errno.h> | 6 #include <errno.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "port/port.h" | 25 #include "port/port.h" |
26 #include "util/logging.h" | 26 #include "util/logging.h" |
27 | 27 |
28 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
29 #include <io.h> | 29 #include <io.h> |
30 #include "base/win/win_util.h" | 30 #include "base/win/win_util.h" |
31 #endif | 31 #endif |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_ANDROID) | 35 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_ANDROID) || \ |
| 36 defined(OS_OPENBSD) |
36 // The following are glibc-specific | 37 // The following are glibc-specific |
37 | 38 |
38 size_t fread_unlocked(void *ptr, size_t size, size_t n, FILE *file) { | 39 size_t fread_unlocked(void *ptr, size_t size, size_t n, FILE *file) { |
39 return fread(ptr, size, n, file); | 40 return fread(ptr, size, n, file); |
40 } | 41 } |
41 | 42 |
42 size_t fwrite_unlocked(const void *ptr, size_t size, size_t n, FILE *file) { | 43 size_t fwrite_unlocked(const void *ptr, size_t size, size_t n, FILE *file) { |
43 return fwrite(ptr, size, n, file); | 44 return fwrite(ptr, size, n, file); |
44 } | 45 } |
45 | 46 |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 ::base::LazyInstance<ChromiumEnv, ::base::LeakyLazyInstanceTraits<ChromiumEnv> > | 548 ::base::LazyInstance<ChromiumEnv, ::base::LeakyLazyInstanceTraits<ChromiumEnv> > |
548 default_env(::base::LINKER_INITIALIZED); | 549 default_env(::base::LINKER_INITIALIZED); |
549 | 550 |
550 } | 551 } |
551 | 552 |
552 Env* Env::Default() { | 553 Env* Env::Default() { |
553 return default_env.Pointer(); | 554 return default_env.Pointer(); |
554 } | 555 } |
555 | 556 |
556 } | 557 } |
OLD | NEW |