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

Side by Side Diff: src/ports/SkOSFile_posix.cpp

Issue 1207893002: Clean up a few includes, introduce iwyu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkTypes to export stddef. Created 5 years, 4 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
« no previous file with comments | « src/ports/SkMemory_malloc.cpp ('k') | src/ports/SkOSFile_stdio.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkOSFile.h" 8 #include "SkOSFile.h"
9 9 #include "SkString.h"
10 #include "SkTFitsIn.h" 10 #include "SkTFitsIn.h"
11 #include "SkTemplates.h"
11 #include "SkTypes.h" 12 #include "SkTypes.h"
12 13
13 #include <dirent.h> 14 #include <dirent.h>
14 #include <stdio.h> 15 #include <stdio.h>
16 #include <string.h>
15 #include <sys/mman.h> 17 #include <sys/mman.h>
16 #include <sys/stat.h> 18 #include <sys/stat.h>
17 #include <sys/types.h> 19 #include <sys/types.h>
18 #include <unistd.h> 20 #include <unistd.h>
19 21
20 bool sk_exists(const char *path, SkFILE_Flags flags) { 22 bool sk_exists(const char *path, SkFILE_Flags flags) {
21 int mode = F_OK; 23 int mode = F_OK;
22 if (flags & kRead_SkFILE_Flag) { 24 if (flags & kRead_SkFILE_Flag) {
23 mode |= R_OK; 25 mode |= R_OK;
24 } 26 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 174 }
173 if (entry) { // we broke out with a file 175 if (entry) { // we broke out with a file
174 if (name) { 176 if (name) {
175 name->set(entry->d_name); 177 name->set(entry->d_name);
176 } 178 }
177 return true; 179 return true;
178 } 180 }
179 } 181 }
180 return false; 182 return false;
181 } 183 }
OLDNEW
« no previous file with comments | « src/ports/SkMemory_malloc.cpp ('k') | src/ports/SkOSFile_stdio.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698