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

Side by Side Diff: sandbox/linux/seccomp-bpf/port.h

Issue 66723007: Make sandbox/linux/seccomp-bpf/ follow the style guide. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (empty) rebase Created 7 years, 1 month 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/linux/seccomp-bpf/instruction.h ('k') | sandbox/linux/seccomp-bpf/sandbox_bpf.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Commonly used macro definitions to make the code build in different 5 // Commonly used macro definitions to make the code build in different
6 // target environments (e.g. as part of Chrome vs. stand-alone) 6 // target environments (e.g. as part of Chrome vs. stand-alone)
7 7
8 #ifndef SANDBOX_LINUX_SECCOMP_BPF_PORT_H__ 8 #ifndef SANDBOX_LINUX_SECCOMP_BPF_PORT_H__
9 #define SANDBOX_LINUX_SECCOMP_BPF_PORT_H__ 9 #define SANDBOX_LINUX_SECCOMP_BPF_PORT_H__
10 10
11 #if !defined(SECCOMP_BPF_STANDALONE) 11 #if !defined(SECCOMP_BPF_STANDALONE)
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/posix/eintr_wrapper.h" 14 #include "base/posix/eintr_wrapper.h"
15 #else 15 #else
16 #define arraysize(x) (sizeof(x)/sizeof(*(x))) 16 #define arraysize(x) (sizeof(x) / sizeof(*(x)))
17 17
18 #define HANDLE_EINTR TEMP_FAILURE_RETRY 18 #define HANDLE_EINTR TEMP_FAILURE_RETRY
19 19
20 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ 20 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
21 TypeName(const TypeName&); \ 21 TypeName(const TypeName&); \
22 void operator=(const TypeName&) 22 void operator=(const TypeName&)
23 23
24 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ 24 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
25 TypeName(); \ 25 TypeName(); \
26 DISALLOW_COPY_AND_ASSIGN(TypeName) 26 DISALLOW_COPY_AND_ASSIGN(TypeName)
27 27
28 template <bool> 28 template <bool>
29 struct CompileAssert { 29 struct CompileAssert {};
30 };
31 30
32 #define COMPILE_ASSERT(expr, msg) \ 31 #define COMPILE_ASSERT(expr, msg) \
33 typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] 32 typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
34 #endif 33 #endif
35 34
36 #endif // SANDBOX_LINUX_SECCOMP_BPF_PORT_H__ 35 #endif // SANDBOX_LINUX_SECCOMP_BPF_PORT_H__
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/instruction.h ('k') | sandbox/linux/seccomp-bpf/sandbox_bpf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698