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

Side by Side Diff: base/file_util_posix.cc

Issue 774001: BSD port changes for base/ (OS_POSIX/GTK instead of OS_LINUX... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « base/base.gypi ('k') | base/linux_util.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <fnmatch.h> 10 #include <fnmatch.h>
(...skipping 21 matching lines...) Expand all
32 #include "base/logging.h" 32 #include "base/logging.h"
33 #include "base/scoped_ptr.h" 33 #include "base/scoped_ptr.h"
34 #include "base/singleton.h" 34 #include "base/singleton.h"
35 #include "base/string_util.h" 35 #include "base/string_util.h"
36 #include "base/sys_string_conversions.h" 36 #include "base/sys_string_conversions.h"
37 #include "base/time.h" 37 #include "base/time.h"
38 #include "base/utf_string_conversions.h" 38 #include "base/utf_string_conversions.h"
39 39
40 namespace file_util { 40 namespace file_util {
41 41
42 #if defined(OS_FREEBSD) || \ 42 #if defined(OS_OPENBSD) || defined(OS_FREEBSD) || \
43 (defined(OS_MACOSX) && \ 43 (defined(OS_MACOSX) && \
44 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) 44 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
45 typedef struct stat stat_wrapper_t; 45 typedef struct stat stat_wrapper_t;
46 static int CallStat(const char *path, stat_wrapper_t *sb) { 46 static int CallStat(const char *path, stat_wrapper_t *sb) {
47 return stat(path, sb); 47 return stat(path, sb);
48 } 48 }
49 #else 49 #else
50 typedef struct stat64 stat_wrapper_t; 50 typedef struct stat64 stat_wrapper_t;
51 static int CallStat(const char *path, stat_wrapper_t *sb) { 51 static int CallStat(const char *path, stat_wrapper_t *sb) {
52 return stat64(path, sb); 52 return stat64(path, sb);
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 length_ = 0; 701 length_ = 0;
702 file_ = base::kInvalidPlatformFileValue; 702 file_ = base::kInvalidPlatformFileValue;
703 } 703 }
704 704
705 bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info, 705 bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info,
706 const base::Time& cutoff_time) { 706 const base::Time& cutoff_time) {
707 return find_info.stat.st_mtime >= cutoff_time.ToTimeT(); 707 return find_info.stat.st_mtime >= cutoff_time.ToTimeT();
708 } 708 }
709 709
710 } // namespace file_util 710 } // namespace file_util
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/linux_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698