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