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

Unified Diff: native_client_sdk/src/libraries/nacl_io/syscalls/fdopen.c

Issue 417323002: Dropping fdopen workaround now that glibc has been fixed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/library.dsc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/syscalls/fdopen.c
diff --git a/native_client_sdk/src/libraries/nacl_io/syscalls/fdopen.c b/native_client_sdk/src/libraries/nacl_io/syscalls/fdopen.c
deleted file mode 100644
index 744922298c7c2c720ea900c1cdf1e8d921ad4d44..0000000000000000000000000000000000000000
--- a/native_client_sdk/src/libraries/nacl_io/syscalls/fdopen.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#include <stdio.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#if defined(__native_client__) && defined(__GLIBC__)
-
-static ssize_t fdopen_read(void *cookie, char *buf, size_t size) {
- return read((int) cookie, buf, size);
-}
-
-static ssize_t fdopen_write(void *cookie, const char *buf, size_t size) {
- return write((int) cookie, buf, size);
-}
-
-static int fdopen_seek(void *cookie, off_t *offset, int whence) {
- off_t ret = lseek((int) cookie, *offset, whence);
- if (ret < 0) {
- return -1;
- }
- *offset = ret;
- return 0;
-}
-
-static int fdopen_close(void *cookie) {
- return close((int) cookie);
-}
-
-static cookie_io_functions_t fdopen_functions = {
- fdopen_read,
- fdopen_write,
- fdopen_seek,
- fdopen_close,
-};
-
-/*
- * TODO(bradnelson): Remove this glibc is fixed.
- * See: https://code.google.com/p/nativeclient/issues/detail?id=3362
- * Workaround fdopen in glibc failing due to it vetting the provided file
- * handles with fcntl which is not currently interceptable.
- */
-FILE *fdopen(int fildes, const char *mode) {
- return fopencookie((void *) fildes, mode, fdopen_functions);
-}
-
-#endif /* defined(__native_client__) && defined(__GLIBC__) */
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/library.dsc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698