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

Side by Side Diff: base/file_util_posix.cc

Issue 185713005: Add support for FreeBSD in base/ , base/process/ , and base/threading so that the bootstrap binary … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 6
7 #include <dirent.h> 7 #include <dirent.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <libgen.h> 10 #include <libgen.h>
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 return false; 668 return false;
669 } else { 669 } else {
670 #endif // defined(OS_ANDROID) 670 #endif // defined(OS_ANDROID)
671 if (CallStat(file_path.value().c_str(), &file_info) != 0) 671 if (CallStat(file_path.value().c_str(), &file_info) != 0)
672 return false; 672 return false;
673 #if defined(OS_ANDROID) 673 #if defined(OS_ANDROID)
674 } 674 }
675 #endif // defined(OS_ANDROID) 675 #endif // defined(OS_ANDROID)
676 results->is_directory = S_ISDIR(file_info.st_mode); 676 results->is_directory = S_ISDIR(file_info.st_mode);
677 results->size = file_info.st_size; 677 results->size = file_info.st_size;
678 #if defined(OS_MACOSX) 678 #if defined(OS_MACOSX) || (defined(OS_FREEBSD) && __FreeBSD_version < 900000)
Nico 2014/03/10 19:58:33 Is it reasonable to only support __FreeBSD_version
r.c.ladan 2014/03/10 20:08:02 FreeBSD 8.X will be supported until 2015-06-30, so
679 results->last_modified = Time::FromTimeSpec(file_info.st_mtimespec); 679 results->last_modified = Time::FromTimeSpec(file_info.st_mtimespec);
680 results->last_accessed = Time::FromTimeSpec(file_info.st_atimespec); 680 results->last_accessed = Time::FromTimeSpec(file_info.st_atimespec);
681 results->creation_time = Time::FromTimeSpec(file_info.st_ctimespec); 681 results->creation_time = Time::FromTimeSpec(file_info.st_ctimespec);
682 #elif defined(OS_ANDROID) 682 #elif defined(OS_ANDROID)
683 results->last_modified = Time::FromTimeT(file_info.st_mtime); 683 results->last_modified = Time::FromTimeT(file_info.st_mtime);
684 results->last_accessed = Time::FromTimeT(file_info.st_atime); 684 results->last_accessed = Time::FromTimeT(file_info.st_atime);
685 results->creation_time = Time::FromTimeT(file_info.st_ctime); 685 results->creation_time = Time::FromTimeT(file_info.st_ctime);
686 #else 686 #else
687 results->last_modified = Time::FromTimeSpec(file_info.st_mtim); 687 results->last_modified = Time::FromTimeSpec(file_info.st_mtim);
688 results->last_accessed = Time::FromTimeSpec(file_info.st_atim); 688 results->last_accessed = Time::FromTimeSpec(file_info.st_atim);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 result = false; 960 result = false;
961 if (IGNORE_EINTR(close(outfile)) < 0) 961 if (IGNORE_EINTR(close(outfile)) < 0)
962 result = false; 962 result = false;
963 963
964 return result; 964 return result;
965 } 965 }
966 #endif // !defined(OS_MACOSX) 966 #endif // !defined(OS_MACOSX)
967 967
968 } // namespace internal 968 } // namespace internal
969 } // namespace base 969 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/process/process_handle_freebsd.cc » ('j') | base/process/process_iterator_freebsd.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698