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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/syscalls/fdopen.c

Issue 61763014: Add build target for nacl_io from the NaCl SDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Add new targets back into all.gyp, readd main function in dsc_info.py 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
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 _GNU_SOURCE
5 #define _GNU_SOURCE 6 #define _GNU_SOURCE
7 #endif
6 #include <stdio.h> 8 #include <stdio.h>
7 #include <sys/types.h> 9 #include <sys/types.h>
8 #include <unistd.h> 10 #include <unistd.h>
9 11
10 #if defined(__native_client__) && defined(__GLIBC__) 12 #if defined(__native_client__) && defined(__GLIBC__)
11 13
12 static ssize_t fdopen_read(void *cookie, char *buf, size_t size) { 14 static ssize_t fdopen_read(void *cookie, char *buf, size_t size) {
13 return read((int) cookie, buf, size); 15 return read((int) cookie, buf, size);
14 } 16 }
15 17
(...skipping 25 matching lines...) Expand all
41 * TODO(bradnelson): Remove this glibc is fixed. 43 * TODO(bradnelson): Remove this glibc is fixed.
42 * See: https://code.google.com/p/nativeclient/issues/detail?id=3362 44 * See: https://code.google.com/p/nativeclient/issues/detail?id=3362
43 * Workaround fdopen in glibc failing due to it vetting the provided file 45 * Workaround fdopen in glibc failing due to it vetting the provided file
44 * handles with fcntl which is not currently interceptable. 46 * handles with fcntl which is not currently interceptable.
45 */ 47 */
46 FILE *fdopen(int fildes, const char *mode) { 48 FILE *fdopen(int fildes, const char *mode) {
47 return fopencookie((void *) fildes, mode, fdopen_functions); 49 return fopencookie((void *) fildes, mode, fdopen_functions);
48 } 50 }
49 51
50 #endif /* defined(__native_client__) && defined(__GLIBC__) */ 52 #endif /* defined(__native_client__) && defined(__GLIBC__) */
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/library.dsc ('k') | native_client_sdk/src/libraries/nacl_io/syscalls/mount.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698