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

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

Issue 10826233: Add _android files for building DartVM on Android (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporate reviewer's feedback (asiva, Soren Gjesse) Created 8 years, 4 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/platform_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 "bin/file.h" 5 #include "bin/file.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 int result = fstat(fd, &buf); 233 int result = fstat(fd, &buf);
234 if (result == -1) { 234 if (result == -1) {
235 FATAL2("Failed stat on file descriptor %d: %s", fd, strerror(errno)); 235 FATAL2("Failed stat on file descriptor %d: %s", fd, strerror(errno));
236 } 236 }
237 if (S_ISCHR(buf.st_mode)) return kTerminal; 237 if (S_ISCHR(buf.st_mode)) return kTerminal;
238 if (S_ISFIFO(buf.st_mode)) return kPipe; 238 if (S_ISFIFO(buf.st_mode)) return kPipe;
239 if (S_ISSOCK(buf.st_mode)) return kSocket; 239 if (S_ISSOCK(buf.st_mode)) return kSocket;
240 if (S_ISREG(buf.st_mode)) return kFile; 240 if (S_ISREG(buf.st_mode)) return kFile;
241 return kOther; 241 return kOther;
242 } 242 }
OLDNEW
« no previous file with comments | « runtime/bin/fdutils_android.cc ('k') | runtime/bin/platform_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698