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

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

Issue 1207893002: Clean up a few includes, introduce iwyu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: There are people on the internet who are wrong! Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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
10 #include <errno.h> 10 #include <errno.h>
11 #include <stdio.h> 11 #include <stdio.h>
12 #include <sys/stat.h> 12 #include <sys/stat.h>
13 #include <sys/types.h>
14 13
15 #ifdef _WIN32 14 #ifdef _WIN32
16 #include <direct.h> 15 #include <direct.h>
17 #include <io.h> 16 #include <io.h>
18 #endif 17 #endif
19 18
19 #include "SkTypes.h"
20
20 SkFILE* sk_fopen(const char path[], SkFILE_Flags flags) { 21 SkFILE* sk_fopen(const char path[], SkFILE_Flags flags) {
21 char perm[4]; 22 char perm[4];
22 char* p = perm; 23 char* p = perm;
23 24
24 if (flags & kRead_SkFILE_Flag) { 25 if (flags & kRead_SkFILE_Flag) {
25 *p++ = 'r'; 26 *p++ = 'r';
26 } 27 }
27 if (flags & kWrite_SkFILE_Flag) { 28 if (flags & kWrite_SkFILE_Flag) {
28 *p++ = 'w'; 29 *p++ = 'w';
29 } 30 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 #else 147 #else
147 retval = mkdir(path, 0777); 148 retval = mkdir(path, 0777);
148 #endif 149 #endif
149 if (0 == retval) { 150 if (0 == retval) {
150 return true; 151 return true;
151 } else { 152 } else {
152 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path); 153 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path);
153 return false; 154 return false;
154 } 155 }
155 } 156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698