Commit | Line | Data |
---|---|---|
61ec970d PH |
1 | /* Exim: OS-specific C header file for Linux */ |
2 | ||
b87a6e0e PP |
3 | /* Some old systems we've received bug-reports for have a <limits.h> which |
4 | does not pull in <features.h>. Best to just pull it in now and have done | |
5 | with the issue. */ | |
9d26b8c0 PP |
6 | |
7 | #include <features.h> | |
8 | ||
9 | ||
61ec970d PH |
10 | #define CRYPT_H |
11 | #define GLIBC_IP_OPTIONS | |
12 | #define HAVE_MMAP | |
6e2b4ccc | 13 | #define HAVE_BSD_GETLOADAVG |
26034054 | 14 | #define HAVE_SYS_STATVFS_H |
61ec970d | 15 | #define NO_IP_VAR_H |
61ec970d PH |
16 | #define SIG_IGN_WORKS |
17 | ||
80a47a2c TK |
18 | /* When using the DKIM, setting HAVE_LINUX_SENDFILE can increase |
19 | performance on outgoing mail a bit. Note: With older glibc versions | |
20 | this setting will conflict with the _FILE_OFFSET_BITS=64 setting | |
21 | defined as part of the Linux CFLAGS. */ | |
2f43ad4a TK |
22 | |
23 | /* #define HAVE_LINUX_SENDFILE */ | |
24 | ||
6e2b4ccc PH |
25 | #define F_FREESP O_TRUNC |
26 | typedef struct flock flock_t; | |
27 | ||
28 | #define os_strsignal strsignal | |
29 | #define OS_STRSIGNAL | |
30 | ||
31 | #if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD_kernel__) | |
32 | #define SIOCGIFCONF_GIVES_ADDR | |
33 | #define HAVE_SYS_MOUNT_H | |
34 | #endif | |
35 | ||
36 | #if defined(__linux__) | |
37 | ||
61ec970d PH |
38 | /* Some versions of Linux need explicit sync-ing of directories as well as |
39 | files. This setting requests that. If the directory is on NFS, it may not | |
40 | be possible to sync it - in that case, Exim now should ignore the error. But | |
41 | if you have problems in that area, try undefining this. But be aware that you | |
42 | may be in a situation where files are not being properly "committed to stable | |
43 | storage" as quickly as Exim thinks they are. */ | |
44 | ||
45 | #define NEED_SYNC_DIRECTORY | |
46 | ||
47 | /* Other OS have "const" in here */ | |
48 | #define ICONV_ARG2_TYPE char ** | |
49 | ||
61ec970d PH |
50 | #define os_find_running_interfaces os_find_running_interfaces_linux |
51 | ||
52 | /* Need a prototype for the Linux-specific function. The structure hasn't | |
53 | been defined yet, so we need to pre-declare it. */ | |
54 | ||
55 | struct ip_address_item; | |
56 | extern struct ip_address_item *os_find_running_interfaces_linux(void); | |
57 | ||
6e2b4ccc PH |
58 | #endif /* __linux__ */ |
59 | ||
05ec18de PP |
60 | /* Some folks running "unusual" setups with very old libc environments have |
61 | found that _GNU_SOURCE=1 before <features.h> is not sufficient to define some | |
62 | constants needed for 64-bit arithmetic. If you encounter build errors based | |
63 | on LLONG_MIN being undefined and various other escape hatches have not helped, | |
64 | then change the 0 to 1 in the next block. */ | |
65 | ||
66 | #if 0 | |
67 | # define LLONG_MIN LONG_LONG_MIN | |
68 | # define LLONG_MAX LONG_LONG_MAX | |
69 | #endif | |
70 | ||
71 | ||
61ec970d | 72 | /* End */ |