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