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

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

Issue 87623002: Use ino64_t on linux, to match the output of stat64. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « no previous file | no next file » | 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_LINUX) 6 #if defined(TARGET_OS_LINUX)
7 7
8 #include "bin/directory.h" 8 #include "bin/directory.h"
9 9
10 #include <dirent.h> // NOLINT 10 #include <dirent.h> // NOLINT
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void PathBuffer::Reset(int new_length) { 62 void PathBuffer::Reset(int new_length) {
63 length_ = new_length; 63 length_ = new_length;
64 AsString()[length_] = '\0'; 64 AsString()[length_] = '\0';
65 } 65 }
66 66
67 67
68 // A linked list of symbolic links, with their unique file system identifiers. 68 // A linked list of symbolic links, with their unique file system identifiers.
69 // These are scanned to detect loops while doing a recursive directory listing. 69 // These are scanned to detect loops while doing a recursive directory listing.
70 struct LinkList { 70 struct LinkList {
71 dev_t dev; 71 dev_t dev;
72 ino_t ino; 72 ino64_t ino;
73 LinkList* next; 73 LinkList* next;
74 }; 74 };
75 75
76 76
77 ListType DirectoryListingEntry::Next(DirectoryListing* listing) { 77 ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
78 if (done_) { 78 if (done_) {
79 return kListDone; 79 return kListDone;
80 } 80 }
81 81
82 if (lister_ == 0) { 82 if (lister_ == 0) {
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 bool Directory::Rename(const char* path, const char* new_path) { 437 bool Directory::Rename(const char* path, const char* new_path) {
438 ExistsResult exists = Exists(path); 438 ExistsResult exists = Exists(path);
439 if (exists != EXISTS) return false; 439 if (exists != EXISTS) return false;
440 return (TEMP_FAILURE_RETRY(rename(path, new_path)) == 0); 440 return (TEMP_FAILURE_RETRY(rename(path, new_path)) == 0);
441 } 441 }
442 442
443 } // namespace bin 443 } // namespace bin
444 } // namespace dart 444 } // namespace dart
445 445
446 #endif // defined(TARGET_OS_LINUX) 446 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698