Debian Codegraph @

OS/os.h-SunOS5

raw
1 /* Exim: OS-specific C header file for SunOS5 aka Solaris */
2
3 /* Copyright (c) The Exim Maintainers 2021 - 2026 */
4 /* SPDX-License-Identifier: GPL-2.0-or-later */
5
6 /* The Sun Studio compilers define these, but GCC does not.
7 Adjust if needed. */
8 #if !defined(__SunOS_5_10) && !defined(__SunOS_5_11)
9 # define __SunOS_5_11
10 #endif
11
12
13 #define CRYPT_H
14 #define HAVE_MMAP
15 #define HAVE_SYS_STATVFS_H
16 #define F_FAVAIL f_favail
17 #define SIOCGIFCONF_GIVES_ADDR
18
19 #define HAVE_GETIPNODEBYNAME 1
20 #define HAVE_GETIPNODEBYADDR 1
21 #define EXIM_HAVE_OPENAT
22 #define EXIM_HAVE_FUTIMENS
23
24 #define HAVE_KSTAT
25 #define LOAD_AVG_KSTAT "system_misc"
26 #define LOAD_AVG_KSTAT_MODULE "unix"
27 #define LOAD_AVG_SYMBOL "avenrun_1min"
28 #define LOAD_AVG_FIELD value.ui32
29
30 #define os_strsignal strsignal
31 #define OS_STRSIGNAL
32
33 /* This is needed for some early Solaris releases, but causes trouble
34 in the current ones, so it is out by default. */
35
36 /* #define EXIM_SOCKLEN_T size_t */
37
38 /* This is different from Linux and all other PAM implementations,
39 it seems. */
40
41 #define PAM_CONVERSE_ARG2_TYPE struct pam_message
42
43
44 /* default is non-const */
45 #define ICONV_ARG2_TYPE const char **
46 /* A GCC user reported that the following was needed. Possibly using
47 Glibc iconv?
48 #define ICONV_ARG2_TYPE char ** restrict
49 A way of spotting the difference would be useful.
50 */
51
52 #if _POSIX_C_SOURCE + 0 < 200112L
53 # define MISSING_UNSETENV_3
54 #endif
55
56 #if _POSIX_C_SOURCE + 0 < 200809L
57 # define MISSING_POSIX_MEMALIGN
58 # define MISSING_POSIX_STPCPY
59
60 # ifdef __SunOS_5_10
61 extern unsigned long strnlen(const char *, unsigned long);
62 # endif
63 #endif
64
65 /* SunOS5 doesn't accept getcwd(NULL, 0) to auto-allocate
66 a buffer */
67
68 #define OS_GETCWD
69
70
71 #ifndef MIN
72 # define MIN(a,b) (((a)<(b))?(a):(b))
73 # define MAX(a,b) (((a)>(b))?(a):(b))
74 #endif
75
76 #ifdef __SunOS_5_11
77 # include <strings.h> /* for bzero() on Solaris 11.4 */
78 #endif
79
80 /* End */