s3:winbindd: use better debug messages than 'talloc_strdup failed'
[metze/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 #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 #ifndef HAVE_DIRFD
127 #ifdef HAVE_DIR_DD_FD
128 #define dirfd(x) ((x)->dd_fd)
129 #else
130 #define dirfd(d) (-1)
131 #endif
132 #define HAVE_DIRFD 1
133 #endif
134
135
136 /* we lie about having pidfile() so that NetBSD5 can compile. Nothing
137    in the parts of heimdal we use actually uses pidfile(), and we
138    don't use it in Samba, so this works, although its ugly */
139 #ifndef HAVE_PIDFILE
140 #define HAVE_PIDFILE
141 #endif
142
143 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
144 #ifndef HAVE___ATTRIBUTE__
145 #define HAVE___ATTRIBUTE__
146 #endif
147 #endif
148
149 #include "system/network.h"
150
151 /*
152  * we don't want that roken.h.in includes socket_wrapper
153  * we include socket_wrapper via "system/network.h"
154  */
155 #undef SOCKET_WRAPPER_REPLACE
156 #include "heimdal/lib/roken/roken.h.in"
157
158 extern const char *heimdal_version;
159 extern const char *heimdal_long_version;
160
161 /* we do not want any __APPLE__ magic */
162 #ifdef __APPLE__
163 #undef __APPLE__
164 #endif
165
166 #endif