Testsuite: OpenSSL version output variances
[exim.git] / src / OS / os.h-FreeBSD
CommitLineData
61ec970d
PH
1/* Exim: OS-specific C header file for FreeBSD */
2
7d758a6a
JH
3#include <sys/types.h>
4
61ec970d 5#define HAVE_BSD_GETLOADAVG
79378e0f 6#define HAVE_SETCLASSRESOURCES
61ec970d
PH
7#define HAVE_MMAP
8#define HAVE_SYS_MOUNT_H
9#define SIOCGIFCONF_GIVES_ADDR
0eb8eedd
NM
10#define HAVE_SRANDOMDEV
11#define HAVE_ARC4RANDOM
61ec970d
PH
12
13typedef struct flock flock_t;
14
863bd541
PP
15/* iconv arg2 type: libiconv in Ports uses "const char* * inbuf" and was
16 * traditionally the only approach available. The iconv functionality
17 * in libc is "char ** restrict src".
18 *
19 * <https://www.freebsd.org/doc/en/books/porters-handbook/using-iconv.html>
20 * says that libc has iconv since 2013, in 10-CURRENT. FreeBSD man-pages
21 * shows it included in 10.0-RELEASE. Writing this in 2017, 10.3 is the
22 * oldest supported release, so we should assume non-libiconv by default.
852e25c5
PP
23 * (Actually, people still using old releases past EOL; we shouldn't support
24 * them but I don't want to deal with howls of complaints because we dare
25 * to not support the unsupported, so guard this on FreeBSD 10+)
863bd541
PP
26 *
27 * Thus we no longer override iconv.
28 *
29 * However, if libiconv is installed, and anything adds /usr/local/include
30 * to include-path (likely) then we'll get that. So define a variable
31 * which makes the libiconv try to not interfere with OS iconv.
32 */
852e25c5
PP
33#if __FreeBSD__ >= 10
34# define LIBICONV_PLUG
35#endif
36/* for more specific version constraints, include <sys/param.h> and look at
37 * __FreeBSD_version */
9c19b270 38
7d758a6a
JH
39
40/* When using DKIM, setting OS_SENDFILE can increase
41performance on outgoing mail a bit. */
42
43#define OS_SENDFILE
44extern ssize_t os_sendfile(int, int, off_t *, size_t);
45
a2673768
JH
46
47/*******************/
48
49/* TCP_FASTOPEN support. There does not seems to be a
50MSG_FASTOPEN defined yet... */
10ac8d7f 51#define EXIM_TFO_PROBE
a2673768
JH
52
53#include <netinet/tcp.h> /* for TCP_FASTOPEN */
54#include <sys/socket.h> /* for MSG_FASTOPEN */
55#if defined(TCP_FASTOPEN) && !defined(MSG_FASTOPEN)
56# define MSG_FASTOPEN 0x20000000
57#endif
58
59/* for TCP state-variable values, for TFO logging */
60#include <netinet/tcp_fsm.h>
61#define TCP_SYN_RECV TCPS_SYN_RECEIVED
62
63/*******************/
64
61ec970d 65/* End */