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

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

Issue 15200005: Grab bag of clang fixes for Windows code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ptr and cast style Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/policy_params.h ('k') | ui/shell_dialogs/select_file_dialog_win_unittest.cc » ('j') | 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 <stdint.h> 10 #include <stdint.h>
11 #include <string> 11 #include <string>
12 #include <cstring> 12 #include <cstring>
13 #include "base/atomicops.h" 13 #include "base/atomicops.h"
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/synchronization/condition_variable.h" 15 #include "base/synchronization/condition_variable.h"
16 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
17 17
18 // Linux's ThreadIdentifier() needs this. 18 // Linux's ThreadIdentifier() needs this.
19 #if defined(OS_LINUX) 19 #if defined(OS_LINUX)
20 # include <linux/unistd.h> 20 # include <linux/unistd.h>
21 #endif 21 #endif
22 22
23 #if defined(OS_WIN) 23 #if defined(OS_WIN)
24 #define snprintf _snprintf 24 #define snprintf _snprintf
25 #define va_copy(a, b) do { (a) = (b); } while (0) 25 #if !defined(__clang__)
26 # define va_copy(a, b) do { (a) = (b); } while (0)
27 #endif
26 #endif 28 #endif
27 29
28 namespace leveldb { 30 namespace leveldb {
29 namespace port { 31 namespace port {
30 32
31 // Chromium only supports little endian. 33 // Chromium only supports little endian.
32 static const bool kLittleEndian = true; 34 static const bool kLittleEndian = true;
33 35
34 class Mutex { 36 class Mutex {
35 public: 37 public:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 char* output); 111 char* output);
110 112
111 inline bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg) { 113 inline bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg) {
112 return false; 114 return false;
113 } 115 }
114 116
115 } 117 }
116 } 118 }
117 119
118 #endif // STORAGE_LEVELDB_PORT_PORT_CHROMIUM_H_ 120 #endif // STORAGE_LEVELDB_PORT_PORT_CHROMIUM_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/policy_params.h ('k') | ui/shell_dialogs/select_file_dialog_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698