| 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 <unistd.h>-lookalike-ish. Note that this is a C header, so that | 5 // Partial <unistd.h>-lookalike-ish. Note that this is a C header, so that |
| 6 // crappy (and non-crappy) C programs can use it. | 6 // crappy (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_UNISTD_H_ | 11 #ifndef MOJO_SERVICES_FILES_C_MOJIO_UNISTD_H_ |
| 12 #define MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_UNISTD_H_ | 12 #define MOJO_SERVICES_FILES_C_MOJIO_UNISTD_H_ |
| 13 | 13 |
| 14 // Includes -------------------------------------------------------------------- | 14 // Includes -------------------------------------------------------------------- |
| 15 | 15 |
| 16 // <unistd.h> is required to define |NULL| (as a macro) and |size_t|. We don't | 16 // <unistd.h> is required to define |NULL| (as a macro) and |size_t|. We don't |
| 17 // define our own (with prefixes), and just use the standard ones from | 17 // define our own (with prefixes), and just use the standard ones from |
| 18 // <stddef.h>. | 18 // <stddef.h>. |
| 19 #include <stddef.h> | 19 #include <stddef.h> |
| 20 | 20 |
| 21 // <unistd.h> is required to |ssize_t|, |uid_t|, |gid_t|, |off_t|, |pid_t|, and | 21 // <unistd.h> is required to |ssize_t|, |uid_t|, |gid_t|, |off_t|, |pid_t|, and |
| 22 // |useconds_t| from <sys/types.h>, so we may as well define our versions by | 22 // |useconds_t| from <sys/types.h>, so we may as well define our versions by |
| 23 // inclusion. | 23 // inclusion. |
| 24 #include "files/public/c/mojio_sys_types.h" | 24 #include "files/c/mojio_sys_types.h" |
| 25 | 25 |
| 26 // Macros ---------------------------------------------------------------------- | 26 // Macros ---------------------------------------------------------------------- |
| 27 | 27 |
| 28 // "Whence". These are duplicated (verbatim) in mojio_stdio.h. | 28 // "Whence". These are duplicated (verbatim) in mojio_stdio.h. |
| 29 #define MOJIO_SEEK_SET 0 | 29 #define MOJIO_SEEK_SET 0 |
| 30 #define MOJIO_SEEK_CUR 1 | 30 #define MOJIO_SEEK_CUR 1 |
| 31 #define MOJIO_SEEK_END 2 | 31 #define MOJIO_SEEK_END 2 |
| 32 | 32 |
| 33 // TODO(vtl): Nothing else here yet. | 33 // TODO(vtl): Nothing else here yet. |
| 34 | 34 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // TODO(vtl): Some of the others. | 145 // TODO(vtl): Some of the others. |
| 146 | 146 |
| 147 // Globals --------------------------------------------------------------------- | 147 // Globals --------------------------------------------------------------------- |
| 148 | 148 |
| 149 // TODO(vtl): Nothing here yet. | 149 // TODO(vtl): Nothing here yet. |
| 150 | 150 |
| 151 #ifdef __cplusplus | 151 #ifdef __cplusplus |
| 152 } // extern "C" | 152 } // extern "C" |
| 153 #endif | 153 #endif |
| 154 | 154 |
| 155 #endif // MOJO_SERVICES_FILES_PUBLIC_C_MOJIO_UNISTD_H_ | 155 #endif // MOJO_SERVICES_FILES_C_MOJIO_UNISTD_H_ |
| OLD | NEW |