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

Side by Side Diff: base/file_util_posix.cc

Issue 10808037: Update #if guards in base/ that control whether to use stat or stat64 (and friends). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « no previous file | base/platform_file_posix.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) 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 <fnmatch.h> 10 #include <fnmatch.h>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #endif 51 #endif
52 52
53 #if !defined(OS_IOS) 53 #if !defined(OS_IOS)
54 #include <grp.h> 54 #include <grp.h>
55 #endif 55 #endif
56 56
57 namespace file_util { 57 namespace file_util {
58 58
59 namespace { 59 namespace {
60 60
61 #if defined(OS_BSD) || defined(OS_IOS) || (defined(OS_MACOSX) && \ 61 #if defined(OS_BSD) || defined(OS_IOS) || defined(OS_MACOSX)
Mark Mentovai 2012/07/19 20:38:41 Doesn’t OS_IOS imply OS_MACOSX? You should be able
Robert Sesek 2012/07/19 20:43:01 Yes, it does. base/build_config.h: #if defined(__
62 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
63 typedef struct stat stat_wrapper_t; 62 typedef struct stat stat_wrapper_t;
64 static int CallStat(const char *path, stat_wrapper_t *sb) { 63 static int CallStat(const char *path, stat_wrapper_t *sb) {
65 base::ThreadRestrictions::AssertIOAllowed(); 64 base::ThreadRestrictions::AssertIOAllowed();
66 return stat(path, sb); 65 return stat(path, sb);
67 } 66 }
68 static int CallLstat(const char *path, stat_wrapper_t *sb) { 67 static int CallLstat(const char *path, stat_wrapper_t *sb) {
69 base::ThreadRestrictions::AssertIOAllowed(); 68 base::ThreadRestrictions::AssertIOAllowed();
70 return lstat(path, sb); 69 return lstat(path, sb);
71 } 70 }
72 #else 71 #else
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 1151
1153 allowed_group_ids.insert(group_record->gr_gid); 1152 allowed_group_ids.insert(group_record->gr_gid);
1154 } 1153 }
1155 1154
1156 return VerifyPathControlledByUser( 1155 return VerifyPathControlledByUser(
1157 kFileSystemRoot, path, kRootUid, allowed_group_ids); 1156 kFileSystemRoot, path, kRootUid, allowed_group_ids);
1158 } 1157 }
1159 #endif // defined(OS_MACOSX) 1158 #endif // defined(OS_MACOSX)
1160 1159
1161 } // namespace file_util 1160 } // namespace file_util
OLDNEW
« no previous file with comments | « no previous file | base/platform_file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698