heimdal_build: Remove ignored argument ldflags from HEIMDAL_BINARY().
[sfrench/samba-autobuild/.git] / source4 / heimdal_build / roken.h
1 /*
2   a wrapper to override some of the defines that the heimdal roken system looks at
3  */
4 #ifndef _ROKEN_H_
5 #define _ROKEN_H_
6
7 /* Support 'weak' keys for now, it can't be worse than NTLM and we don't want to hard-code the behaviour at this point */
8 #define HEIM_WEAK_CRYPTO 1
9
10 /* path to sysconf - should we force this to samba LIBDIR ? */
11 #define SYSCONFDIR "/etc"
12
13 #define rk_PATH_DELIM '/'
14
15 #define HEIMDAL_LOCALEDIR "/usr/heimdal/locale"
16
17 /* Maximum values on all known systems */
18 #define MaxHostNameLen (64+4)
19 #define MaxPathLen (1024+4)
20
21 /* We want PKINIT */
22 #define PKINIT 1
23
24 #define VERSIONLIST {"Lorikeet-Heimdal, Modified for Samba4"}
25
26 #define VERSION "Samba"
27
28 #define ROKEN_LIB_FUNCTION
29 #define ROKEN_LIB_CALL
30 #define GETHOSTBYADDR_PROTO_COMPATIBLE
31 #define GETSERVBYNAME_PROTO_COMPATIBLE
32 #define OPENLOG_PROTO_COMPATIBLE
33 #define GETSOCKNAME_PROTO_COMPATIBLE
34
35 /* even if we do have dlopen, we don't want heimdal using it */
36 #undef HAVE_DLOPEN
37
38 /* we need to tell roken about the functions that Samba replaces in lib/replace */
39 #ifndef HAVE_SETEUID
40 #define HAVE_SETEUID 1
41 #endif
42
43 #ifndef HAVE_STRNLEN
44 #define HAVE_STRNLEN
45 #endif
46
47 #ifndef HAVE_STRNDUP
48 #define HAVE_STRNDUP
49 #endif
50
51 #ifndef HAVE_STRLCPY
52 #define HAVE_STRLCPY
53 #endif
54
55 #ifndef HAVE_STRLCAT
56 #define HAVE_STRLCAT
57 #endif
58
59 #ifndef HAVE_STRCASECMP
60 #define HAVE_STRCASECMP
61 #endif
62
63 #ifndef HAVE_ASPRINTF
64 #define HAVE_ASPRINTF
65 #endif
66
67 #ifndef HAVE_VASPRINTF
68 #define HAVE_VASPRINTF
69 #endif
70
71 #ifndef HAVE_MKSTEMP
72 #define HAVE_MKSTEMP
73 #endif
74
75 #ifndef HAVE_SETENV
76 #define HAVE_SETENV
77 #endif
78
79 #ifndef HAVE_UNSETENV
80 #define HAVE_UNSETENV
81 #endif
82
83 #ifndef HAVE_VSYSLOG
84 #define HAVE_VSYSLOG
85 #endif
86
87 #ifndef HAVE_SSIZE_T
88 #define HAVE_SSIZE_T
89 #endif
90
91 #ifndef HAVE_STRPTIME
92 #define HAVE_STRPTIME
93 #endif
94
95 #ifndef HAVE_TIMEGM
96 #define HAVE_TIMEGM
97 #endif
98
99 #ifndef HAVE_INNETGR
100 #define HAVE_INNETGR
101 #endif
102
103 #ifndef HAVE_INET_ATON
104 #define HAVE_INET_ATON
105 #endif
106
107 #ifndef HAVE_INET_NTOP
108 #define HAVE_INET_NTOP
109 #endif
110
111 #ifndef HAVE_INET_PTON
112 #define HAVE_INET_PTON
113 #endif
114
115 #ifndef HAVE_GETTIMEOFDAY
116 #define HAVE_GETTIMEOFDAY
117 #endif
118
119 #ifndef HAVE_SETEGID
120 #define HAVE_SETEGID
121 #endif
122
123 #ifndef HAVE_SETEUID
124 #define HAVE_SETEUID
125 #endif
126
127 /* force the use of the libreplace strerror_r */
128 #ifndef HAVE_STRERROR_R
129 #define HAVE_STRERROR_R
130 #endif
131 #ifndef STRERROR_R_PROTO_COMPATIBLE
132 #define STRERROR_R_PROTO_COMPATIBLE
133 #endif
134
135 #ifndef HAVE_DIRFD
136 #ifdef HAVE_DIR_DD_FD
137 #define dirfd(x) ((x)->dd_fd)
138 #else
139 #define dirfd(d) (-1)
140 #endif
141 #define HAVE_DIRFD 1
142 #endif
143
144
145 /* we lie about having pidfile() so that NetBSD5 can compile. Nothing
146    in the parts of heimdal we use actually uses pidfile(), and we
147    don't use it in Samba, so this works, although its ugly */
148 #ifndef HAVE_PIDFILE
149 #define HAVE_PIDFILE
150 #endif
151
152 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
153 #ifndef HAVE___ATTRIBUTE__
154 #define HAVE___ATTRIBUTE__
155 #endif
156 #endif
157
158 #include "system/network.h"
159
160 /*
161  * we don't want that roken.h.in includes socket_wrapper
162  * we include socket_wrapper via "system/network.h"
163  */
164 #undef SOCKET_WRAPPER_REPLACE
165 #include "heimdal/lib/roken/roken.h.in"
166
167 extern const char *heimdal_version;
168 extern const char *heimdal_long_version;
169
170 /* we do not want any __APPLE__ magic */
171 #ifdef __APPLE__
172 #undef __APPLE__
173 #endif
174
175 #endif