s4:heimdal: import lorikeet-heimdal-201012010201 (commit 81fe27bcc0148d410ca4617f8759...
[kai/samba.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 #include "config.h"
8
9 /* 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 */
10 #define HEIM_WEAK_CRYPTO 1
11
12 /* path to sysconf - should we force this to samba LIBDIR ? */
13 #define SYSCONFDIR "/etc"
14
15 #define rk_PATH_DELIM '/'
16
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 ROKEN_LIB_FUNCTION
27 #define ROKEN_LIB_CALL
28 #define ROKEN_LIB_VARIABLE
29 #define GETHOSTBYADDR_PROTO_COMPATIBLE
30 #define GETSERVBYNAME_PROTO_COMPATIBLE
31 #define OPENLOG_PROTO_COMPATIBLE
32 #define GETSOCKNAME_PROTO_COMPATIBLE
33
34 /* even if we do have dlopen, we don't want heimdal using it */
35 #undef HAVE_DLOPEN
36
37 /* we need to tell roken about the functions that Samba replaces in lib/replace */
38 #ifndef HAVE_SETEUID
39 #define HAVE_SETEUID 1
40 #endif
41
42 #ifndef HAVE_STRNLEN
43 #define HAVE_STRNLEN
44 #endif
45
46 #ifndef HAVE_STRNDUP
47 #define HAVE_STRNDUP
48 #endif
49
50 #ifndef HAVE_STRLCPY
51 #define HAVE_STRLCPY
52 #endif
53
54 #ifndef HAVE_STRLCAT
55 #define HAVE_STRLCAT
56 #endif
57
58 #ifndef HAVE_STRCASECMP
59 #define HAVE_STRCASECMP
60 #endif
61
62 #ifndef HAVE_ASPRINTF
63 #define HAVE_ASPRINTF
64 #endif
65
66 #ifndef HAVE_VASPRINTF
67 #define HAVE_VASPRINTF
68 #endif
69
70 #ifndef HAVE_MKSTEMP
71 #define HAVE_MKSTEMP
72 #endif
73
74 #ifndef HAVE_SETENV
75 #define HAVE_SETENV
76 #endif
77
78 #ifndef HAVE_UNSETENV
79 #define HAVE_UNSETENV
80 #endif
81
82 #ifndef HAVE_VSYSLOG
83 #define HAVE_VSYSLOG
84 #endif
85
86 #ifndef HAVE_SSIZE_T
87 #define HAVE_SSIZE_T
88 #endif
89
90 #ifndef HAVE_STRPTIME
91 #define HAVE_STRPTIME
92 #endif
93
94 #ifndef HAVE_TIMEGM
95 #define HAVE_TIMEGM
96 #endif
97
98 #ifndef HAVE_INNETGR
99 #define HAVE_INNETGR
100 #endif
101
102 #ifndef HAVE_INET_ATON
103 #define HAVE_INET_ATON
104 #endif
105
106 #ifndef HAVE_INET_NTOP
107 #define HAVE_INET_NTOP
108 #endif
109
110 #ifndef HAVE_INET_PTON
111 #define HAVE_INET_PTON
112 #endif
113
114 #ifndef HAVE_GETTIMEOFDAY
115 #define HAVE_GETTIMEOFDAY
116 #endif
117
118 #ifndef HAVE_SETEGID
119 #define HAVE_SETEGID
120 #endif
121
122 #ifndef HAVE_SETEUID
123 #define HAVE_SETEUID
124 #endif
125
126 /* force the use of the libreplace strerror_r */
127 #ifndef HAVE_STRERROR_R
128 #define HAVE_STRERROR_R
129 #endif
130 #ifndef STRERROR_R_PROTO_COMPATIBLE
131 #define STRERROR_R_PROTO_COMPATIBLE
132 #endif
133
134 #ifndef HAVE_DIRFD
135 #ifdef HAVE_DIR_DD_FD
136 #define dirfd(x) ((x)->dd_fd)
137 #else
138 #define dirfd(d) (-1)
139 #endif
140 #define HAVE_DIRFD 1
141 #endif
142
143
144 /* we lie about having pidfile() so that NetBSD5 can compile. Nothing
145    in the parts of heimdal we use actually uses pidfile(), and we
146    don't use it in Samba, so this works, although its ugly */
147 #ifndef HAVE_PIDFILE
148 #define HAVE_PIDFILE
149 #endif
150
151 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
152 #ifndef HAVE___ATTRIBUTE__
153 #define HAVE___ATTRIBUTE__
154 #endif
155 #endif
156
157 #include "system/network.h"
158
159 /*
160  * we don't want that roken.h.in includes socket_wrapper
161  * we include socket_wrapper via "system/network.h"
162  */
163 #undef SOCKET_WRAPPER_REPLACE
164 #include "heimdal/lib/roken/roken.h.in"
165
166 extern const char *heimdal_version;
167 extern const char *heimdal_long_version;
168
169 /* we do not want any __APPLE__ magic */
170 #ifdef __APPLE__
171 #undef __APPLE__
172 #endif
173
174 #endif