initial commit
[glibc.git] / sysdeps / generic / not-cancel.h
1 /* Uncancelable versions of cancelable interfaces. Generic version.
2 Copyright (C) 2003-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #ifndef NOT_CANCEL_H
20 # define NOT_CANCEL_H
21
22 #include <fcntl.h>
23 #include <poll.h>
24 #include <unistd.h>
25 #include <sys/wait.h>
26 #include <time.h>
27 #include <sys/uio.h>
28
29 /* By default we have none. Map the name to the normal functions. */
30 #define __open_nocancel(...) \
31 __open (__VA_ARGS__)
32 #define __open64_nocancel(...) \
33 __open64 (__VA_ARGS__)
34 #define __openat_nocancel(...) \
35 __openat (__VA_ARGS__)
36 #define __openat64_nocancel(...) \
37 __openat64 (__VA_ARGS__)
38 #define __close_nocancel(fd) \
39 __close (fd)
40 #define __close_nocancel_nostatus(fd) \
41 (void) __close (fd)
42 #define __read_nocancel(fd, buf, n) \
43 __read (fd, buf, n)
44 #define __pread64_nocancel(fd, buf, count, offset) \
45 __pread64 (fd, buf, count, offset)
46 #define __write_nocancel(fd, buf, n) \
47 __write (fd, buf, n)
48 #define __writev_nocancel_nostatus(fd, iov, n) \
49 (void) __writev (fd, iov, n)
50 #define __fcntl64_nocancel(fd, cmd, ...) \
51 __fcntl64 (fd, cmd, __VA_ARGS__)
52 #define __getrandom_nocancel(buf, size, flags) \
53 __getrandom (buf, size, flags)
54 #define __poll_infinity_nocancel(fds, nfds) \
55 __poll (fds, nfds, -1)
56
57 #endif /* NOT_CANCEL_H */