OLD | NEW |
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 #include "SkTypes.h" |
9 | 10 |
10 #include <errno.h> | 11 #include <errno.h> |
11 #include <stdio.h> | 12 #include <stdio.h> |
12 #include <sys/stat.h> | 13 #include <sys/stat.h> |
13 #include <sys/types.h> | |
14 | 14 |
15 #ifdef _WIN32 | 15 #ifdef _WIN32 |
16 #include <direct.h> | 16 #include <direct.h> |
17 #include <io.h> | 17 #include <io.h> |
18 #endif | 18 #endif |
19 | 19 |
20 SkFILE* sk_fopen(const char path[], SkFILE_Flags flags) { | 20 SkFILE* sk_fopen(const char path[], SkFILE_Flags flags) { |
21 char perm[4]; | 21 char perm[4]; |
22 char* p = perm; | 22 char* p = perm; |
23 | 23 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 #else | 146 #else |
147 retval = mkdir(path, 0777); | 147 retval = mkdir(path, 0777); |
148 #endif | 148 #endif |
149 if (0 == retval) { | 149 if (0 == retval) { |
150 return true; | 150 return true; |
151 } else { | 151 } else { |
152 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path); | 152 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path); |
153 return false; | 153 return false; |
154 } | 154 } |
155 } | 155 } |
OLD | NEW |