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

Side by Side Diff: src/shared/imc/nacl_imc_common.cc

Issue 788193003: Create a build_config header file. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 7
8 /* NaCl inter-module communication primitives. */ 8 /* NaCl inter-module communication primitives. */
9 9
10 #include "native_client/src/include/nacl_defines.h"
11
10 /* Used for UINT32_MAX */ 12 /* Used for UINT32_MAX */
11 #if !NACL_WINDOWS 13 #if !NACL_WINDOWS
12 # ifndef __STDC_LIMIT_MACROS 14 # ifndef __STDC_LIMIT_MACROS
13 # define __STDC_LIMIT_MACROS 15 # define __STDC_LIMIT_MACROS
14 # endif 16 # endif
15 #include <stdint.h> 17 #include <stdint.h>
16 #endif 18 #endif
17 19
18 /* TODO(robertm): stdio.h is included for NULL only - find a better way */ 20 /* TODO(robertm): stdio.h is included for NULL only - find a better way */
19 #include <stdio.h> 21 #include <stdio.h>
(...skipping 11 matching lines...) Expand all
31 /* we assume that sizeof(uint32_t) <= sizeof(size_t) */ 33 /* we assume that sizeof(uint32_t) <= sizeof(size_t) */
32 34
33 for (ix = 0; ix < message->iov_length; ++ix) { 35 for (ix = 0; ix < message->iov_length; ++ix) {
34 if (kMax - cur_bytes < message->iov[ix].length) { 36 if (kMax - cur_bytes < message->iov[ix].length) {
35 return 0; 37 return 0;
36 } 38 }
37 cur_bytes += message->iov[ix].length; /* no overflow is possible */ 39 cur_bytes += message->iov[ix].length; /* no overflow is possible */
38 } 40 }
39 return 1; 41 return 1;
40 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698