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

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

Issue 619723004: Fix following compiler warnings: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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
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_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "bin/file.h" 8 #include "bin/file.h"
9 9
10 #include <fcntl.h> // NOLINT 10 #include <fcntl.h> // NOLINT
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 bool File::IsAbsolutePath(const char* pathname) { 502 bool File::IsAbsolutePath(const char* pathname) {
503 // Should we consider network paths? 503 // Should we consider network paths?
504 if (pathname == NULL) return false; 504 if (pathname == NULL) return false;
505 return (strlen(pathname) > 2) && 505 return (strlen(pathname) > 2) &&
506 (pathname[1] == ':') && 506 (pathname[1] == ':') &&
507 (pathname[2] == '\\' || pathname[2] == '/'); 507 (pathname[2] == '\\' || pathname[2] == '/');
508 } 508 }
509 509
510 510
511 char* File::GetCanonicalPath(const char* pathname) { 511 char* File::GetCanonicalPath(const char* pathname) {
512 struct _stat st;
513 const wchar_t* system_name = StringUtils::Utf8ToWide(pathname); 512 const wchar_t* system_name = StringUtils::Utf8ToWide(pathname);
514 HANDLE file_handle = CreateFileW( 513 HANDLE file_handle = CreateFileW(
515 system_name, 514 system_name,
516 0, 515 0,
517 FILE_SHARE_READ, 516 FILE_SHARE_READ,
518 NULL, 517 NULL,
519 OPEN_EXISTING, 518 OPEN_EXISTING,
520 FILE_FLAG_BACKUP_SEMANTICS, 519 FILE_FLAG_BACKUP_SEMANTICS,
521 NULL); 520 NULL);
522 if (file_handle == INVALID_HANDLE_VALUE) { 521 if (file_handle == INVALID_HANDLE_VALUE) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 return kIdentical; 645 return kIdentical;
647 } else { 646 } else {
648 return kDifferent; 647 return kDifferent;
649 } 648 }
650 } 649 }
651 650
652 } // namespace bin 651 } // namespace bin
653 } // namespace dart 652 } // namespace dart
654 653
655 #endif // defined(TARGET_OS_WINDOWS) 654 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW
« no previous file with comments | « runtime/bin/crypto_win.cc ('k') | runtime/vm/os_win.cc » ('j') | runtime/vm/stub_code_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698