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

Side by Side Diff: third_party/leveldatabase/port/port_chromium.h

Issue 2364903003: Suppress definition of snprintf in port_chromium.h which conflicts with base::snprintf. (Closed)
Patch Set: Created 4 years, 2 months 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
« no previous file with comments | « third_party/leveldatabase/env_chromium.cc ('k') | 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 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 // See port_example.h for documentation for the following types/functions. 5 // See port_example.h for documentation for the following types/functions.
6 6
7 #ifndef STORAGE_LEVELDB_PORT_PORT_CHROMIUM_H_ 7 #ifndef STORAGE_LEVELDB_PORT_PORT_CHROMIUM_H_
8 #define STORAGE_LEVELDB_PORT_PORT_CHROMIUM_H_ 8 #define STORAGE_LEVELDB_PORT_PORT_CHROMIUM_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
11 #include <stdint.h> 11 #include <stdint.h>
12 12
13 #include <cstring> 13 #include <cstring>
14 #include <string> 14 #include <string>
15 15
16 #include "base/atomicops.h" 16 #include "base/atomicops.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/synchronization/condition_variable.h" 18 #include "base/synchronization/condition_variable.h"
19 #include "base/synchronization/lock.h" 19 #include "base/synchronization/lock.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 21
22 // Linux's ThreadIdentifier() needs this. 22 // Linux's ThreadIdentifier() needs this.
23 #if defined(OS_LINUX) 23 #if defined(OS_LINUX)
24 # include <linux/unistd.h> 24 # include <linux/unistd.h>
25 #endif 25 #endif
26 26
27 #if defined(OS_WIN) 27 #if defined(OS_WIN)
28 #define snprintf _snprintf
29 typedef SSIZE_T ssize_t; 28 typedef SSIZE_T ssize_t;
30 #endif 29 #endif
31 30
32 namespace leveldb { 31 namespace leveldb {
33 namespace port { 32 namespace port {
34 33
35 // Chromium only supports little endian. 34 // Chromium only supports little endian.
36 static const bool kLittleEndian = true; 35 static const bool kLittleEndian = true;
37 36
38 class Mutex { 37 class Mutex {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 char* output); 112 char* output);
114 113
115 inline bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg) { 114 inline bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg) {
116 return false; 115 return false;
117 } 116 }
118 117
119 } 118 }
120 } 119 }
121 120
122 #endif // STORAGE_LEVELDB_PORT_PORT_CHROMIUM_H_ 121 #endif // STORAGE_LEVELDB_PORT_PORT_CHROMIUM_H_
OLDNEW
« no previous file with comments | « third_party/leveldatabase/env_chromium.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698