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

Side by Side Diff: runtime/bin/fdutils_linux.cc

Issue 12315020: Fix Windows build: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « runtime/bin/fdutils_android.cc ('k') | runtime/bin/fdutils_macos.cc » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <errno.h> 5 #include "platform/globals.h"
6 #include <fcntl.h> 6 #if defined(TARGET_OS_LINUX)
7 #include <unistd.h> 7
8 #include <sys/ioctl.h> 8 #include <errno.h> // NOLINT
9 #include <fcntl.h> // NOLINT
10 #include <unistd.h> // NOLINT
11 #include <sys/ioctl.h> // NOLINT
9 12
10 #include "bin/fdutils.h" 13 #include "bin/fdutils.h"
11 14
12 15
13 bool FDUtils::SetCloseOnExec(intptr_t fd) { 16 bool FDUtils::SetCloseOnExec(intptr_t fd) {
14 intptr_t status; 17 intptr_t status;
15 status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFD)); 18 status = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFD));
16 if (status < 0) { 19 if (status < 0) {
17 perror("fcntl F_GETFD failed"); 20 perror("fcntl F_GETFD failed");
18 return false; 21 return false;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ASSERT(errno != EWOULDBLOCK); 128 ASSERT(errno != EWOULDBLOCK);
126 return -1; 129 return -1;
127 } else { 130 } else {
128 ASSERT(bytes_written > 0); 131 ASSERT(bytes_written > 0);
129 remaining -= bytes_written; 132 remaining -= bytes_written;
130 buffer_pos += bytes_written; 133 buffer_pos += bytes_written;
131 } 134 }
132 } 135 }
133 return count; 136 return count;
134 } 137 }
138
139 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/bin/fdutils_android.cc ('k') | runtime/bin/fdutils_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698