Fix Hurd build, another go
[exim.git] / src / src / osfunctions.h
CommitLineData
059ec3d9
PH
1/*************************************************
2* Exim - an Internet mail transport agent *
3*************************************************/
4
80fea873 5/* Copyright (c) University of Cambridge 1995 - 2016 */
2791749f 6/* Copyright (c) The Exim Maintainers 2019 */
059ec3d9
PH
7/* See the file NOTICE for conditions of use and distribution. */
8
9/* Prototypes for os-specific functions. For utilities, we don't need the one
10that uses a type that isn't defined for them. */
11
12#ifndef COMPILE_UTILITY
13extern ip_address_item *os_common_find_running_interfaces(void);
14#endif
15
43236f35 16/* If these exist as a macro, then they're overridden away from us and we
b52ce060
PP
17rely upon the system headers to provide prototype declarations for us.
18Notably, strsignal() is not in the Single Unix Specification (v3) and
19predicting constness is awkward. */
20
21#ifndef os_getloadavg
2791749f 22 extern int os_getloadavg(void);
b52ce060
PP
23#endif
24#ifndef os_restarting_signal
2791749f 25 extern void os_restarting_signal(int, void (*)(int));
b52ce060
PP
26#endif
27#ifndef os_non_restarting_signal
2791749f 28 extern void os_non_restarting_signal(int, void (*)(int));
b52ce060
PP
29#endif
30#ifndef os_strexit
2791749f 31 extern const char *os_strexit(int); /* char to match os_strsignal */
b52ce060
PP
32#endif
33#ifndef os_strsignal
2791749f 34 extern const char *os_strsignal(int); /* char to match strsignal in some OS */
b52ce060 35#endif
271019bd 36#ifndef os_unsetenv
2791749f 37 extern int os_unsetenv(const uschar *);
271019bd 38#endif
3ae121c9 39#ifndef os_getcwd
2791749f
JH
40 extern uschar *os_getcwd(uschar *, size_t);
41#endif
42
43#ifdef OS_PIPE_RW_EINTR
44 extern ssize_t os_pipe_read(int fd, void * buf, size_t count);
45 extern ssize_t os_pipe_write(int fd, void * buf, size_t count);
46 extern ssize_t os_pipe_writev(int fd, const struct iovec * iov, int iovcnt);
47#else
48# define os_pipe_read(fd, buf, count) read(fd, buf, count)
49# define os_pipe_write(fd, buf, count) write(fd, buf, count)
50# define os_pipe_writev(fd, buf, count) writev(fd, buf, count)
3ae121c9 51#endif
059ec3d9
PH
52
53/* End of osfunctions.h */