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

Side by Side Diff: bin/file_linux.cc

Issue 8371016: Fix infinite recursion when dealing with cyclic library dependencies. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « bin/file.h ('k') | bin/file_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 <errno.h>
6 #include <fcntl.h> 6 #include <fcntl.h>
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 #include <libgen.h> 9 #include <libgen.h>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return false; 111 return false;
112 } 112 }
113 } 113 }
114 114
115 115
116 bool File::IsAbsolutePath(const char* pathname) { 116 bool File::IsAbsolutePath(const char* pathname) {
117 return (pathname != NULL && pathname[0] == '/'); 117 return (pathname != NULL && pathname[0] == '/');
118 } 118 }
119 119
120 120
121 char* File::GetCanonicalPath(const char* pathname) {
122 char* abs_path = NULL;
123 if (pathname != NULL) {
124 abs_path = realpath(pathname, NULL);
125 assert(abs_path == NULL || IsAbsolutePath(abs_path));
126 }
127 return abs_path;
128 }
129
130
121 const char* File::PathSeparator() { 131 const char* File::PathSeparator() {
122 return "/"; 132 return "/";
123 } 133 }
124 134
125 135
126 const char* File::StringEscapedPathSeparator() { 136 const char* File::StringEscapedPathSeparator() {
127 return "/"; 137 return "/";
128 } 138 }
OLDNEW
« no previous file with comments | « bin/file.h ('k') | bin/file_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698