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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/include/sys/poll.h

Issue 596133002: [NaCl SDK] nacl_io: use standard __BEGIN/__END_DECLS in poll.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | 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) 2013 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2013 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 #ifndef LIBRARIES_NACL_IO_INCLUDE_SYS_POLL_H_ 5 #ifndef LIBRARIES_NACL_IO_INCLUDE_SYS_POLL_H_
6 #define LIBRARIES_NACL_IO_INCLUDE_SYS_POLL_H_ 6 #define LIBRARIES_NACL_IO_INCLUDE_SYS_POLL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9 #include <sys/cdefs.h>
10 #include "sdk_util/macros.h"
11
12 EXTERN_C_BEGIN
13 10
14 /* This header adds definitions of flags and structures for use with poll on 11 /* This header adds definitions of flags and structures for use with poll on
15 * toolchains with 'C' libraries which do not normally supply poll. */ 12 * toolchains with 'C' libraries which do not normally supply poll. */
16 13
17 /* Node state flags */ 14 /* Node state flags */
18 #define POLLIN 0x0001 /* Will not block READ select/poll. */ 15 #define POLLIN 0x0001 /* Will not block READ select/poll. */
19 #define POLLPRI 0x0002 /* There is urgent data to read. */ 16 #define POLLPRI 0x0002 /* There is urgent data to read. */
20 #define POLLOUT 0x0004 /* Will not block WRITE select/poll. */ 17 #define POLLOUT 0x0004 /* Will not block WRITE select/poll. */
21 #define POLLERR 0x0008 /* Will not block EXECPT select/poll. */ 18 #define POLLERR 0x0008 /* Will not block EXECPT select/poll. */
22 #define POLLHUP 0x0010 /* Connection closed on far side. */ 19 #define POLLHUP 0x0010 /* Connection closed on far side. */
23 #define POLLNVAL 0x0020 /* Invalid FD. */ 20 #define POLLNVAL 0x0020 /* Invalid FD. */
24 21
25 /* Number of file descriptors. */ 22 /* Number of file descriptors. */
26 typedef int nfds_t; 23 typedef int nfds_t;
27 24
28 struct pollfd { 25 struct pollfd {
29 int fd; 26 int fd;
30 uint16_t events; 27 uint16_t events;
31 uint16_t revents; 28 uint16_t revents;
32 }; 29 };
33 30
31 __BEGIN_DECLS
32
34 int poll(struct pollfd* __fds, nfds_t __nfds, int __timeout); 33 int poll(struct pollfd* __fds, nfds_t __nfds, int __timeout);
35 34
36 EXTERN_C_END 35 __END_DECLS
37 36
38 #endif /* LIBRARIES_NACL_IO_INCLUDE_SYS_POLL_H_ */ 37 #endif /* LIBRARIES_NACL_IO_INCLUDE_SYS_POLL_H_ */
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698