| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Partial <fcntl.h>-lookalike-ish. Note that this is a C header, so that crappy | 5 // Partial <fcntl.h>-lookalike-ish. Note that this is a C header, so that crappy |
| 6 // (and non-crappy) C programs can use it. | 6 // (and non-crappy) C programs can use it. |
| 7 // | 7 // |
| 8 // In general, functions/types/macros are given "mojio_"/"MOJIO_"/etc. prefixes. | 8 // In general, functions/types/macros are given "mojio_"/"MOJIO_"/etc. prefixes. |
| 9 // There are a handful of exceptions (noted below). | 9 // There are a handful of exceptions (noted below). |
| 10 | 10 |
| 11 #ifndef MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_FCNTL_H_ | 11 #ifndef MOJO_SERVICES_FILES_C_MOJIO_FCNTL_H_ |
| 12 #define MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_FCNTL_H_ | 12 #define MOJO_SERVICES_FILES_C_MOJIO_FCNTL_H_ |
| 13 | 13 |
| 14 // Includes -------------------------------------------------------------------- | 14 // Includes -------------------------------------------------------------------- |
| 15 | 15 |
| 16 #include "files/public/c/mojio_sys_types.h" | 16 #include "files/c/mojio_sys_types.h" |
| 17 | 17 |
| 18 // Macros ---------------------------------------------------------------------- | 18 // Macros ---------------------------------------------------------------------- |
| 19 | 19 |
| 20 // Values for |mojio_fcntl()|'s |cmd| argument (not all are actually | 20 // Values for |mojio_fcntl()|'s |cmd| argument (not all are actually |
| 21 // implemented): | 21 // implemented): |
| 22 #define MOJIO_F_DUPFD 0 | 22 #define MOJIO_F_DUPFD 0 |
| 23 #define MOJIO_F_GETFD 1 | 23 #define MOJIO_F_GETFD 1 |
| 24 #define MOJIO_F_SETFD 2 | 24 #define MOJIO_F_SETFD 2 |
| 25 #define MOJIO_F_GETFL 3 | 25 #define MOJIO_F_GETFL 3 |
| 26 #define MOJIO_F_SETFL 4 | 26 #define MOJIO_F_SETFL 4 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 56 #endif | 56 #endif |
| 57 | 57 |
| 58 int mojio_creat(const char* path, mojio_mode_t mode); | 58 int mojio_creat(const char* path, mojio_mode_t mode); |
| 59 // TODO(vtl): int mojio_fcntl(int fd, int cmd, ...); | 59 // TODO(vtl): int mojio_fcntl(int fd, int cmd, ...); |
| 60 int mojio_open(const char* path, int oflag, ...); | 60 int mojio_open(const char* path, int oflag, ...); |
| 61 | 61 |
| 62 #ifdef __cplusplus | 62 #ifdef __cplusplus |
| 63 } // extern "C" | 63 } // extern "C" |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 #endif // MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_FCNTL_H_ | 66 #endif // MOJO_SERVICES_FILES_C_MOJIO_FCNTL_H_ |
| OLD | NEW |