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

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

Issue 2152273002: Add support for Fuchsia (Closed) Base URL: https://fuchsia.googlesource.com/third_party/skia@master
Patch Set: Stay a component Created 4 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
« BUILD.gn ('K') | « include/core/SkPreConfig.h ('k') | no next file » | 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 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 #include "SkTypes.h"
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return fwrite(buffer, 1, byteCount, f); 138 return fwrite(buffer, 1, byteCount, f);
139 } 139 }
140 140
141 void sk_fflush(FILE* f) { 141 void sk_fflush(FILE* f) {
142 SkASSERT(f); 142 SkASSERT(f);
143 fflush(f); 143 fflush(f);
144 } 144 }
145 145
146 void sk_fsync(FILE* f) { 146 void sk_fsync(FILE* f) {
147 #if !defined(_WIN32) && !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) \ 147 #if !defined(_WIN32) && !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) \
148 && !defined(_NEWLIB_VERSION) 148 && !defined(_NEWLIB_VERSION) && !defined(__Fuchsia__)
149 int fd = fileno(f); 149 int fd = fileno(f);
150 fsync(fd); 150 fsync(fd);
151 #endif 151 #endif
152 } 152 }
153 153
154 bool sk_fseek(FILE* f, size_t byteCount) { 154 bool sk_fseek(FILE* f, size_t byteCount) {
155 int err = fseek(f, (long)byteCount, SEEK_SET); 155 int err = fseek(f, (long)byteCount, SEEK_SET);
156 return err == 0; 156 return err == 0;
157 } 157 }
158 158
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 #else 199 #else
200 retval = mkdir(path, 0777); 200 retval = mkdir(path, 0777);
201 #endif 201 #endif
202 if (0 == retval) { 202 if (0 == retval) {
203 return true; 203 return true;
204 } else { 204 } else {
205 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path); 205 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path);
206 return false; 206 return false;
207 } 207 }
208 } 208 }
OLDNEW
« BUILD.gn ('K') | « include/core/SkPreConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698