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

Side by Side Diff: src/include/nacl_compiler_annotations.h

Issue 6937003: modified nacl_sync.h to have NACL_WUR for all functions that return a (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 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 | « no previous file | src/include/portability.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 #ifndef NATIVE_CLIENT_SRC_INCLUDE_NACL_COMPILER_ANNOTATIONS_H_
8 #define NATIVE_CLIENT_SRC_INCLUDE_NACL_COMPILER_ANNOTATIONS_H_
9
10 /* MSVC supports "inline" only in C++ */
11 #if NACL_WINDOWS
12 # define INLINE __forceinline
13 #else
14 # define INLINE __inline__
15 #endif
16
17 #if NACL_WINDOWS
18 # define DLLEXPORT __declspec(dllexport)
19 #elif defined(NACL_LINUX) || defined(NACL_OSX)
20 # define DLLEXPORT __attribute__ ((visibility("default")))
21 #elif defined(__native_client__)
22 /* do nothing */
23 #else
24 # error "what platform?"
25 #endif
26
27 #if NACL_WINDOWS
28 # define ATTRIBUTE_FORMAT_PRINTF(m, n)
29 #else
30 # define ATTRIBUTE_FORMAT_PRINTF(m, n) __attribute__((format(printf, m, n)))
31 #endif
32
33 #if NACL_WINDOWS
34 # define UNREFERENCED_PARAMETER(P) (P)
35 #else
36 # define UNREFERENCED_PARAMETER(P) do { (void) P; } while (0)
37 #endif
38
39 #if NACL_WINDOWS
40 # define NORETURN __declspec(noreturn)
41 #else
42 # define NORETURN __attribute__((noreturn)) /* assumes gcc */
43 # define _cdecl /* empty */
44 #endif
45
46 #if NACL_WINDOWS
47 # define THREAD __declspec(thread)
48 #else
49 # define THREAD __thread
50 # define WINAPI
51 #endif
52
53 #if NACL_WINDOWS
54 # define NACL_WUR
55 #else
56 # define NACL_WUR __attribute__((__warn_unused_result__))
57 #endif
58
59 #endif
OLDNEW
« no previous file with comments | « no previous file | src/include/portability.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698