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

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

Issue 2515643004: Fuchsia: Partial implementation of dart:io sockets (Closed)
Patch Set: Formatting Created 4 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
« no previous file with comments | « runtime/bin/fdutils_linux.cc ('k') | runtime/bin/socket_android.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 "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "bin/fdutils.h" 8 #include "bin/fdutils.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return -1; 130 return -1;
131 } else { 131 } else {
132 ASSERT(bytes_written > 0); 132 ASSERT(bytes_written > 0);
133 remaining -= bytes_written; 133 remaining -= bytes_written;
134 buffer_pos += bytes_written; 134 buffer_pos += bytes_written;
135 } 135 }
136 } 136 }
137 return count; 137 return count;
138 } 138 }
139 139
140
141 void FDUtils::SaveErrorAndClose(intptr_t fd) {
142 int err = errno;
143 VOID_TEMP_FAILURE_RETRY(close(fd));
144 errno = err;
145 }
146
140 } // namespace bin 147 } // namespace bin
141 } // namespace dart 148 } // namespace dart
142 149
143 #endif // defined(TARGET_OS_MACOS) 150 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/fdutils_linux.cc ('k') | runtime/bin/socket_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698