xref: /llvm-project/libc/include/llvm-libc-types/cookie_io_functions_t.h (revision 88a0a318e80565fef9367728b878641d261acfb6)
1 //===-- Definition of type cookie_io_functions_t --------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIBC_TYPES_COOKIE_IO_FUNCTIONS_T_H
10 #define LLVM_LIBC_TYPES_COOKIE_IO_FUNCTIONS_T_H
11 
12 #include "off64_t.h"
13 #include "size_t.h"
14 #include "ssize_t.h"
15 
16 typedef ssize_t cookie_read_function_t(void *, char *, size_t);
17 typedef ssize_t cookie_write_function_t(void *, const char *, size_t);
18 typedef int cookie_seek_function_t(void *, off64_t *, int);
19 typedef int cookie_close_function_t(void *);
20 
21 typedef struct {
22   cookie_read_function_t *read;
23   cookie_write_function_t *write;
24   cookie_seek_function_t *seek;
25   cookie_close_function_t *close;
26 } cookie_io_functions_t;
27 
28 #endif // LLVM_LIBC_TYPES_COOKIE_IO_FUNCTIONS_T_H
29