xref: /onnv-gate/usr/src/lib/libsasl/include/config.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3*0Sstevel@tonic-gate  * Use is subject to license terms.
4*0Sstevel@tonic-gate  */
5*0Sstevel@tonic-gate 
6*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
7*0Sstevel@tonic-gate 
8*0Sstevel@tonic-gate /*
9*0Sstevel@tonic-gate  * Copyright (c) 1998-2003 Carnegie Mellon University.  All rights reserved.
10*0Sstevel@tonic-gate  *
11*0Sstevel@tonic-gate  * Redistribution and use in source and binary forms, with or without
12*0Sstevel@tonic-gate  * modification, are permitted provided that the following conditions
13*0Sstevel@tonic-gate  * are met:
14*0Sstevel@tonic-gate  *
15*0Sstevel@tonic-gate  * 1. Redistributions of source code must retain the above copyright
16*0Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer.
17*0Sstevel@tonic-gate  *
18*0Sstevel@tonic-gate  * 2. Redistributions in binary form must reproduce the above copyright
19*0Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer in
20*0Sstevel@tonic-gate  *    the documentation and/or other materials provided with the
21*0Sstevel@tonic-gate  *    distribution.
22*0Sstevel@tonic-gate  *
23*0Sstevel@tonic-gate  * 3. The name "Carnegie Mellon University" must not be used to
24*0Sstevel@tonic-gate  *    endorse or promote products derived from this software without
25*0Sstevel@tonic-gate  *    prior written permission. For permission or any other legal
26*0Sstevel@tonic-gate  *    details, please contact
27*0Sstevel@tonic-gate  *      Office of Technology Transfer
28*0Sstevel@tonic-gate  *      Carnegie Mellon University
29*0Sstevel@tonic-gate  *      5000 Forbes Avenue
30*0Sstevel@tonic-gate  *      Pittsburgh, PA  15213-3890
31*0Sstevel@tonic-gate  *      (412) 268-4387, fax: (412) 268-7395
32*0Sstevel@tonic-gate  *      tech-transfer@andrew.cmu.edu
33*0Sstevel@tonic-gate  *
34*0Sstevel@tonic-gate  * 4. Redistributions of any form whatsoever must retain the following
35*0Sstevel@tonic-gate  *    acknowledgment:
36*0Sstevel@tonic-gate  *    "This product includes software developed by Computing Services
37*0Sstevel@tonic-gate  *     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
38*0Sstevel@tonic-gate  *
39*0Sstevel@tonic-gate  * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
40*0Sstevel@tonic-gate  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41*0Sstevel@tonic-gate  * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
42*0Sstevel@tonic-gate  * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
43*0Sstevel@tonic-gate  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
44*0Sstevel@tonic-gate  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
45*0Sstevel@tonic-gate  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
46*0Sstevel@tonic-gate  */
47*0Sstevel@tonic-gate 
48*0Sstevel@tonic-gate #ifndef CONFIG_H
49*0Sstevel@tonic-gate #define CONFIG_H
50*0Sstevel@tonic-gate 
51*0Sstevel@tonic-gate #include <sys/types.h>
52*0Sstevel@tonic-gate 
53*0Sstevel@tonic-gate /* Define to empty if the keyword does not work.  */
54*0Sstevel@tonic-gate /* #undef const */
55*0Sstevel@tonic-gate 
56*0Sstevel@tonic-gate /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
57*0Sstevel@tonic-gate #define HAVE_SYS_WAIT_H 1
58*0Sstevel@tonic-gate 
59*0Sstevel@tonic-gate /* Define as __inline if that's what the C compiler calls it.  */
60*0Sstevel@tonic-gate /* #undef inline */
61*0Sstevel@tonic-gate 
62*0Sstevel@tonic-gate /* Define to `int' if <sys/types.h> doesn't define.  */
63*0Sstevel@tonic-gate /* #undef mode_t */
64*0Sstevel@tonic-gate 
65*0Sstevel@tonic-gate /* Define to `int' if <sys/types.h> doesn't define.  */
66*0Sstevel@tonic-gate /* #undef pid_t */
67*0Sstevel@tonic-gate 
68*0Sstevel@tonic-gate /* Define as the return type of signal handlers (int or void).  */
69*0Sstevel@tonic-gate #define RETSIGTYPE void
70*0Sstevel@tonic-gate 
71*0Sstevel@tonic-gate /* Define if you have the ANSI C header files.  */
72*0Sstevel@tonic-gate #define STDC_HEADERS 1
73*0Sstevel@tonic-gate 
74*0Sstevel@tonic-gate /* Define if you can safely include both <sys/time.h> and <time.h>.  */
75*0Sstevel@tonic-gate #define TIME_WITH_SYS_TIME 1
76*0Sstevel@tonic-gate 
77*0Sstevel@tonic-gate /* Set to the database name you want SASL to use for
78*0Sstevel@tonic-gate  * username->secret lookups */
79*0Sstevel@tonic-gate /* #undef SASL_DB_PATH */
80*0Sstevel@tonic-gate 
81*0Sstevel@tonic-gate /* what db package are we using? */
82*0Sstevel@tonic-gate /* #undef SASL_GDBM */
83*0Sstevel@tonic-gate /* #undef SASL_NDBM */
84*0Sstevel@tonic-gate /* #undef SASL_BERKELEYDB */
85*0Sstevel@tonic-gate 
86*0Sstevel@tonic-gate /* which mechs can we link staticly? */
87*0Sstevel@tonic-gate /* #undef STATIC_ANONYMOUS */
88*0Sstevel@tonic-gate /* #undef STATIC_CRAMMD5 */
89*0Sstevel@tonic-gate /* #undef STATIC_DIGESTMD5 */
90*0Sstevel@tonic-gate /* #undef STATIC_GSSAPIV2 */
91*0Sstevel@tonic-gate /* #undef STATIC_KERBEROS4 */
92*0Sstevel@tonic-gate /* #undef STATIC_LOGIN */
93*0Sstevel@tonic-gate /* #undef STATIC_MYSQL */
94*0Sstevel@tonic-gate /* #undef STATIC_NTLM */
95*0Sstevel@tonic-gate /* #undef STATIC_OTP */
96*0Sstevel@tonic-gate /* #undef STATIC_PLAIN */
97*0Sstevel@tonic-gate /* #undef STATIC_SASLDB */
98*0Sstevel@tonic-gate /* #undef STATIC_SRP */
99*0Sstevel@tonic-gate 
100*0Sstevel@tonic-gate /* This is where plugins will live at runtime */
101*0Sstevel@tonic-gate #ifdef _LP64
102*0Sstevel@tonic-gate #if defined(__sparcv9)
103*0Sstevel@tonic-gate #define PLUGINDIR "/usr/lib/sasl/sparcv9"
104*0Sstevel@tonic-gate #elif defined(__amd64)
105*0Sstevel@tonic-gate #define PLUGINDIR "/usr/lib/sasl/amd64"
106*0Sstevel@tonic-gate #else
107*0Sstevel@tonic-gate #error Unsupported 64-bit architecture!
108*0Sstevel@tonic-gate #endif
109*0Sstevel@tonic-gate #else
110*0Sstevel@tonic-gate #define PLUGINDIR "/usr/lib/sasl"
111*0Sstevel@tonic-gate #endif
112*0Sstevel@tonic-gate 
113*0Sstevel@tonic-gate #define SASL_CONFDIR "/etc/sasl"
114*0Sstevel@tonic-gate 
115*0Sstevel@tonic-gate /* should we use the internal rc4 library? */
116*0Sstevel@tonic-gate /* This may be defined in digestmd5 makefile */
117*0Sstevel@tonic-gate /* #undef WITH_RC4 */
118*0Sstevel@tonic-gate 
119*0Sstevel@tonic-gate /* do we have des available? */
120*0Sstevel@tonic-gate /* This may be defined in digestmd5 makefile */
121*0Sstevel@tonic-gate /* #undef WITH_DES */
122*0Sstevel@tonic-gate /* #undef WITH_SSL_DES */
123*0Sstevel@tonic-gate 
124*0Sstevel@tonic-gate /* what about OpenSSL? */
125*0Sstevel@tonic-gate /* #undef HAVE_OPENSSL */
126*0Sstevel@tonic-gate 
127*0Sstevel@tonic-gate /* should we support srp_setpass */
128*0Sstevel@tonic-gate /* #undef DO_SRP_SETPASS */
129*0Sstevel@tonic-gate 
130*0Sstevel@tonic-gate /* do we have OPIE for server-side OTP support? */
131*0Sstevel@tonic-gate /* #undef HAVE_OPIE */
132*0Sstevel@tonic-gate 
133*0Sstevel@tonic-gate /* Do we have kerberos for plaintext password checking? */
134*0Sstevel@tonic-gate /* #undef HAVE_KRB */
135*0Sstevel@tonic-gate 
136*0Sstevel@tonic-gate /* do we have PAM for plaintext password checking? */
137*0Sstevel@tonic-gate #define HAVE_PAM 1
138*0Sstevel@tonic-gate 
139*0Sstevel@tonic-gate /* do we have getsubopt()? */
140*0Sstevel@tonic-gate #define HAVE_GETSUBOPT 1
141*0Sstevel@tonic-gate 
142*0Sstevel@tonic-gate /* Does your system have the snprintf() call? */
143*0Sstevel@tonic-gate #define HAVE_SNPRINTF 1
144*0Sstevel@tonic-gate 
145*0Sstevel@tonic-gate /* Does your system have the vsnprintf() call? */
146*0Sstevel@tonic-gate #define HAVE_VSNPRINTF 1
147*0Sstevel@tonic-gate 
148*0Sstevel@tonic-gate /* should we include support for the pwcheck daemon? */
149*0Sstevel@tonic-gate /* #undef HAVE_PWCHECK */
150*0Sstevel@tonic-gate 
151*0Sstevel@tonic-gate /* where do we look for the pwcheck daemon? */
152*0Sstevel@tonic-gate /* #undef PWCHECKDIR */
153*0Sstevel@tonic-gate 
154*0Sstevel@tonic-gate /* should we include support for the saslauth daemon? */
155*0Sstevel@tonic-gate /* #undef HAVE_SASLAUTHD */
156*0Sstevel@tonic-gate 
157*0Sstevel@tonic-gate /* where does saslauthd look for the communication socket? */
158*0Sstevel@tonic-gate /* #undef PATH_SASLAUTHD_RUNDIR */
159*0Sstevel@tonic-gate 
160*0Sstevel@tonic-gate /* do we want alwaystrue (discouraged)? */
161*0Sstevel@tonic-gate /* #undef HAVE_ALWAYSTRUE */
162*0Sstevel@tonic-gate 
163*0Sstevel@tonic-gate /* are we linking against DMALLOC? */
164*0Sstevel@tonic-gate /* #undef WITH_DMALLOC */
165*0Sstevel@tonic-gate 
166*0Sstevel@tonic-gate /* should we support sasl_checkapop */
167*0Sstevel@tonic-gate #define DO_SASL_CHECKAPOP 1
168*0Sstevel@tonic-gate 
169*0Sstevel@tonic-gate /* do we pay attention to IP addresses in the kerberos 4 tickets? */
170*0Sstevel@tonic-gate /* #undef KRB4_IGNORE_IP_ADDRESS */
171*0Sstevel@tonic-gate 
172*0Sstevel@tonic-gate /* do we have a preferred mechanism, or should we just pick the highest ssf? */
173*0Sstevel@tonic-gate /* #undef PREFER_MECH */
174*0Sstevel@tonic-gate 
175*0Sstevel@tonic-gate /* Do we need a leading _ for dlsym? */
176*0Sstevel@tonic-gate /* #undef DLSYM_NEEDS_UNDERSCORE */
177*0Sstevel@tonic-gate 
178*0Sstevel@tonic-gate /* Does libtool support shared libs on this system? */
179*0Sstevel@tonic-gate #define HAVE_DLFCN_H 1
180*0Sstevel@tonic-gate #define DO_DLOPEN 1
181*0Sstevel@tonic-gate 
182*0Sstevel@tonic-gate /* Should we try to dlopen stuff when we are staticly compiled? */
183*0Sstevel@tonic-gate /* #undef TRY_DLOPEN_WHEN_STATIC */
184*0Sstevel@tonic-gate 
185*0Sstevel@tonic-gate /* define if your system has getaddrinfo() */
186*0Sstevel@tonic-gate #define HAVE_GETADDRINFO 1
187*0Sstevel@tonic-gate #define HAVE_INET_ATON 1
188*0Sstevel@tonic-gate 
189*0Sstevel@tonic-gate /* define if your system has getnameinfo() */
190*0Sstevel@tonic-gate #define HAVE_GETNAMEINFO 1
191*0Sstevel@tonic-gate 
192*0Sstevel@tonic-gate /* define if your system has struct sockaddr_storage */
193*0Sstevel@tonic-gate #define HAVE_STRUCT_SOCKADDR_STORAGE 1
194*0Sstevel@tonic-gate 
195*0Sstevel@tonic-gate /* Define if you have ss_family in struct sockaddr_storage. */
196*0Sstevel@tonic-gate #define HAVE_SS_FAMILY 1
197*0Sstevel@tonic-gate 
198*0Sstevel@tonic-gate /* do we have socklen_t? */
199*0Sstevel@tonic-gate #define HAVE_SOCKLEN_T 1
200*0Sstevel@tonic-gate 
201*0Sstevel@tonic-gate /* #undef HAVE_SOCKADDR_SA_LEN */
202*0Sstevel@tonic-gate 
203*0Sstevel@tonic-gate /* do we use doors for IPC? */
204*0Sstevel@tonic-gate /* #undef USE_DOORS */
205*0Sstevel@tonic-gate 
206*0Sstevel@tonic-gate /* Define if you have the dn_expand function.  */
207*0Sstevel@tonic-gate #define HAVE_DN_EXPAND 1
208*0Sstevel@tonic-gate 
209*0Sstevel@tonic-gate /* Define if you have the dns_lookup function.  */
210*0Sstevel@tonic-gate /* #undef HAVE_DNS_LOOKUP */
211*0Sstevel@tonic-gate 
212*0Sstevel@tonic-gate /* Define if you have the getdomainname function.  */
213*0Sstevel@tonic-gate /* #undef HAVE_GETDOMAINNAME */
214*0Sstevel@tonic-gate 
215*0Sstevel@tonic-gate /* Define if you have the gethostname function.  */
216*0Sstevel@tonic-gate #define HAVE_GETHOSTNAME 1
217*0Sstevel@tonic-gate 
218*0Sstevel@tonic-gate /* Define if you have the getpwnam function.  */
219*0Sstevel@tonic-gate #define HAVE_GETPWNAM 1
220*0Sstevel@tonic-gate 
221*0Sstevel@tonic-gate /* Define if you have the getspnam function.  */
222*0Sstevel@tonic-gate #define HAVE_GETSPNAM 1
223*0Sstevel@tonic-gate 
224*0Sstevel@tonic-gate /* Define if you have the gettimeofday function.  */
225*0Sstevel@tonic-gate #define HAVE_GETTIMEOFDAY 1
226*0Sstevel@tonic-gate 
227*0Sstevel@tonic-gate /* Define if you have the gsskrb5_register_acceptor_identity function.  */
228*0Sstevel@tonic-gate /* #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY */
229*0Sstevel@tonic-gate 
230*0Sstevel@tonic-gate /* Define if you have the jrand48 function.  */
231*0Sstevel@tonic-gate #define HAVE_JRAND48 1
232*0Sstevel@tonic-gate 
233*0Sstevel@tonic-gate /* Define if you have the krb_get_err_text function.  */
234*0Sstevel@tonic-gate /* #undef HAVE_KRB_GET_ERR_TEXT */
235*0Sstevel@tonic-gate 
236*0Sstevel@tonic-gate /* Define if you have the memcpy function.  */
237*0Sstevel@tonic-gate #define HAVE_MEMCPY 1
238*0Sstevel@tonic-gate 
239*0Sstevel@tonic-gate /* Define if you have the mkdir function.  */
240*0Sstevel@tonic-gate #define HAVE_MKDIR 1
241*0Sstevel@tonic-gate 
242*0Sstevel@tonic-gate /* Define if you have the select function.  */
243*0Sstevel@tonic-gate #define HAVE_SELECT 1
244*0Sstevel@tonic-gate 
245*0Sstevel@tonic-gate /* Define if you have the socket function.  */
246*0Sstevel@tonic-gate #define HAVE_SOCKET 1
247*0Sstevel@tonic-gate 
248*0Sstevel@tonic-gate /* Define if you have the strchr function.  */
249*0Sstevel@tonic-gate #define HAVE_STRCHR 1
250*0Sstevel@tonic-gate 
251*0Sstevel@tonic-gate /* Define if you have the strdup function.  */
252*0Sstevel@tonic-gate #define HAVE_STRDUP 1
253*0Sstevel@tonic-gate 
254*0Sstevel@tonic-gate /* Define if you have the strerror function.  */
255*0Sstevel@tonic-gate #define HAVE_STRERROR 1
256*0Sstevel@tonic-gate 
257*0Sstevel@tonic-gate /* Define if you have the strspn function.  */
258*0Sstevel@tonic-gate #define HAVE_STRSPN 1
259*0Sstevel@tonic-gate 
260*0Sstevel@tonic-gate /* Define if you have the strstr function.  */
261*0Sstevel@tonic-gate #define HAVE_STRSTR 1
262*0Sstevel@tonic-gate 
263*0Sstevel@tonic-gate /* Define if you have the strtol function.  */
264*0Sstevel@tonic-gate #define HAVE_STRTOL 1
265*0Sstevel@tonic-gate 
266*0Sstevel@tonic-gate /* Define if you have the syslog function.  */
267*0Sstevel@tonic-gate #define HAVE_SYSLOG 1
268*0Sstevel@tonic-gate 
269*0Sstevel@tonic-gate /* Define if you have the <dirent.h> header file.  */
270*0Sstevel@tonic-gate #define HAVE_DIRENT_H 1
271*0Sstevel@tonic-gate 
272*0Sstevel@tonic-gate /* Define if you have the <dlfcn.h> header file.  */
273*0Sstevel@tonic-gate #define HAVE_DLFCN_H 1
274*0Sstevel@tonic-gate 
275*0Sstevel@tonic-gate /* Define if you have the <fcntl.h> header file.  */
276*0Sstevel@tonic-gate #define HAVE_FCNTL_H 1
277*0Sstevel@tonic-gate 
278*0Sstevel@tonic-gate /* Define if you have the <inttypes.h> header file.  */
279*0Sstevel@tonic-gate #define HAVE_INTTYPES_H 1
280*0Sstevel@tonic-gate 
281*0Sstevel@tonic-gate /* Define if you have the <limits.h> header file.  */
282*0Sstevel@tonic-gate #define HAVE_LIMITS_H 1
283*0Sstevel@tonic-gate 
284*0Sstevel@tonic-gate /* Define if you have the <malloc.h> header file.  */
285*0Sstevel@tonic-gate #define HAVE_MALLOC_H 1
286*0Sstevel@tonic-gate 
287*0Sstevel@tonic-gate /* Define if you have the <ndir.h> header file.  */
288*0Sstevel@tonic-gate /* #undef HAVE_NDIR_H */
289*0Sstevel@tonic-gate 
290*0Sstevel@tonic-gate /* Define if you have the <paths.h> header file.  */
291*0Sstevel@tonic-gate /* #undef HAVE_PATHS_H */
292*0Sstevel@tonic-gate 
293*0Sstevel@tonic-gate /* Define if you have the <stdarg.h> header file.  */
294*0Sstevel@tonic-gate #define HAVE_STDARG_H 1
295*0Sstevel@tonic-gate 
296*0Sstevel@tonic-gate /* Define if you have the <strings.h> header file.  */
297*0Sstevel@tonic-gate #define HAVE_STRINGS_H 1
298*0Sstevel@tonic-gate 
299*0Sstevel@tonic-gate /* Define if you have the <sys/dir.h> header file.  */
300*0Sstevel@tonic-gate /* #undef HAVE_SYS_DIR_H */
301*0Sstevel@tonic-gate 
302*0Sstevel@tonic-gate /* Define if you have the <sys/file.h> header file.  */
303*0Sstevel@tonic-gate #define HAVE_SYS_FILE_H 1
304*0Sstevel@tonic-gate 
305*0Sstevel@tonic-gate /* Define if you have the <sys/ndir.h> header file.  */
306*0Sstevel@tonic-gate /* #undef HAVE_SYS_NDIR_H */
307*0Sstevel@tonic-gate 
308*0Sstevel@tonic-gate /* Define if you have the <sys/param.h> header file.  */
309*0Sstevel@tonic-gate #define HAVE_SYS_PARAM_H 1
310*0Sstevel@tonic-gate 
311*0Sstevel@tonic-gate /* Define if you have the <sys/time.h> header file.  */
312*0Sstevel@tonic-gate #define HAVE_SYS_TIME_H 1
313*0Sstevel@tonic-gate 
314*0Sstevel@tonic-gate /* Define if you have the <sys/uio.h> header file.  */
315*0Sstevel@tonic-gate #define HAVE_SYS_UIO_H 1
316*0Sstevel@tonic-gate 
317*0Sstevel@tonic-gate /* Define if you have the <sysexits.h> header file.  */
318*0Sstevel@tonic-gate #define HAVE_SYSEXITS_H 1
319*0Sstevel@tonic-gate 
320*0Sstevel@tonic-gate /* Define if you have the <syslog.h> header file.  */
321*0Sstevel@tonic-gate #define HAVE_SYSLOG_H 1
322*0Sstevel@tonic-gate 
323*0Sstevel@tonic-gate /* Define if you have the <unistd.h> header file.  */
324*0Sstevel@tonic-gate #define HAVE_UNISTD_H 1
325*0Sstevel@tonic-gate 
326*0Sstevel@tonic-gate /* Define if you have the <varargs.h> header file.  */
327*0Sstevel@tonic-gate #define HAVE_VARARGS_H 1
328*0Sstevel@tonic-gate 
329*0Sstevel@tonic-gate /* Define if you have the db library (-ldb).  */
330*0Sstevel@tonic-gate /* #undef HAVE_LIBDB */
331*0Sstevel@tonic-gate 
332*0Sstevel@tonic-gate /* Define if you have the resolv library (-lresolv).  */
333*0Sstevel@tonic-gate #define HAVE_LIBRESOLV 1
334*0Sstevel@tonic-gate 
335*0Sstevel@tonic-gate /* Name of package */
336*0Sstevel@tonic-gate /* #define PACKAGE "cyrus-sasl" */
337*0Sstevel@tonic-gate 
338*0Sstevel@tonic-gate /* Version number of package */
339*0Sstevel@tonic-gate /* #undef VERSION */
340*0Sstevel@tonic-gate 
341*0Sstevel@tonic-gate /* define if your compiler has __attribute__ */
342*0Sstevel@tonic-gate /* #undef HAVE___ATTRIBUTE__ */
343*0Sstevel@tonic-gate 
344*0Sstevel@tonic-gate /* Define if you have the gssapi.h header file */
345*0Sstevel@tonic-gate /* #undef HAVE_GSSAPI_H */
346*0Sstevel@tonic-gate 
347*0Sstevel@tonic-gate /* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
348*0Sstevel@tonic-gate #define HAVE_GSS_C_NT_HOSTBASED_SERVICE
349*0Sstevel@tonic-gate 
350*0Sstevel@tonic-gate 
351*0Sstevel@tonic-gate /* Create a struct iovec if we need one */
352*0Sstevel@tonic-gate #if !defined(_WIN32) && !defined(HAVE_SYS_UIO_H)
353*0Sstevel@tonic-gate /* (win32 is handled in sasl.h) */
354*0Sstevel@tonic-gate struct iovec {
355*0Sstevel@tonic-gate     char *iov_base;
356*0Sstevel@tonic-gate     long iov_len;
357*0Sstevel@tonic-gate };
358*0Sstevel@tonic-gate #else
359*0Sstevel@tonic-gate #include <sys/uio.h>
360*0Sstevel@tonic-gate #endif
361*0Sstevel@tonic-gate 
362*0Sstevel@tonic-gate /* location of the random number generator */
363*0Sstevel@tonic-gate #ifndef DEV_RANDOM
364*0Sstevel@tonic-gate #define DEV_RANDOM "/dev/urandom"
365*0Sstevel@tonic-gate #endif
366*0Sstevel@tonic-gate #define _DEV_URANDOM "/dev/urandom"
367*0Sstevel@tonic-gate 
368*0Sstevel@tonic-gate /* if we've got krb_get_err_txt, we might as well use it;
369*0Sstevel@tonic-gate    especially since krb_err_txt isn't in some newer distributions
370*0Sstevel@tonic-gate    (MIT Kerb for Mac 4 being a notable example). If we don't have
371*0Sstevel@tonic-gate    it, we fall back to the krb_err_txt array */
372*0Sstevel@tonic-gate #ifdef HAVE_KRB_GET_ERR_TEXT
373*0Sstevel@tonic-gate #define get_krb_err_txt krb_get_err_text
374*0Sstevel@tonic-gate #else
375*0Sstevel@tonic-gate #define get_krb_err_txt(X) (krb_err_txt[(X)])
376*0Sstevel@tonic-gate #endif
377*0Sstevel@tonic-gate 
378*0Sstevel@tonic-gate /* Make Solaris happy... */
379*0Sstevel@tonic-gate #ifndef __EXTENSIONS__
380*0Sstevel@tonic-gate #define __EXTENSIONS__
381*0Sstevel@tonic-gate #endif
382*0Sstevel@tonic-gate 
383*0Sstevel@tonic-gate /* Make Linux happy... */
384*0Sstevel@tonic-gate #ifndef _GNU_SOURCE
385*0Sstevel@tonic-gate #define _GNU_SOURCE
386*0Sstevel@tonic-gate #endif
387*0Sstevel@tonic-gate 
388*0Sstevel@tonic-gate #ifndef HAVE___ATTRIBUTE__
389*0Sstevel@tonic-gate /* Can't use attributes... */
390*0Sstevel@tonic-gate #define __attribute__(foo)
391*0Sstevel@tonic-gate #endif
392*0Sstevel@tonic-gate 
393*0Sstevel@tonic-gate #define SASL_PATH_ENV_VAR "SASL_PATH"
394*0Sstevel@tonic-gate 
395*0Sstevel@tonic-gate #include <stdlib.h>
396*0Sstevel@tonic-gate #include <sys/socket.h>
397*0Sstevel@tonic-gate #ifndef WIN32
398*0Sstevel@tonic-gate # include <netdb.h>
399*0Sstevel@tonic-gate # ifdef HAVE_SYS_PARAM_H
400*0Sstevel@tonic-gate #  include <sys/param.h>
401*0Sstevel@tonic-gate # endif
402*0Sstevel@tonic-gate #else /* WIN32 */
403*0Sstevel@tonic-gate # include <winsock.h>
404*0Sstevel@tonic-gate #endif /* WIN32 */
405*0Sstevel@tonic-gate 
406*0Sstevel@tonic-gate #include <string.h>
407*0Sstevel@tonic-gate 
408*0Sstevel@tonic-gate #include <netinet/in.h>
409*0Sstevel@tonic-gate 
410*0Sstevel@tonic-gate #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
411*0Sstevel@tonic-gate #define	_SS_MAXSIZE	128	/* Implementation specific max size */
412*0Sstevel@tonic-gate #define	_SS_PADSIZE	(_SS_MAXSIZE - sizeof (struct sockaddr))
413*0Sstevel@tonic-gate 
414*0Sstevel@tonic-gate struct sockaddr_storage {
415*0Sstevel@tonic-gate 	struct	sockaddr ss_sa;
416*0Sstevel@tonic-gate 	char		__ss_pad2[_SS_PADSIZE];
417*0Sstevel@tonic-gate };
418*0Sstevel@tonic-gate # define ss_family ss_sa.sa_family
419*0Sstevel@tonic-gate #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
420*0Sstevel@tonic-gate 
421*0Sstevel@tonic-gate #ifndef AF_INET6
422*0Sstevel@tonic-gate /* Define it to something that should never appear */
423*0Sstevel@tonic-gate #define	AF_INET6	AF_MAX
424*0Sstevel@tonic-gate #endif
425*0Sstevel@tonic-gate 
426*0Sstevel@tonic-gate #ifndef HAVE_GETADDRINFO
427*0Sstevel@tonic-gate #define	getaddrinfo	sasl_getaddrinfo
428*0Sstevel@tonic-gate #define	freeaddrinfo	sasl_freeaddrinfo
429*0Sstevel@tonic-gate #define	getnameinfo	sasl_getnameinfo
430*0Sstevel@tonic-gate #define	gai_strerror	sasl_gai_strerror
431*0Sstevel@tonic-gate #include "gai.h"
432*0Sstevel@tonic-gate #endif
433*0Sstevel@tonic-gate 
434*0Sstevel@tonic-gate /* Defined in RFC 1035. max strlen is only 253 due to length bytes. */
435*0Sstevel@tonic-gate #ifndef MAXHOSTNAMELEN
436*0Sstevel@tonic-gate #define        MAXHOSTNAMELEN  255
437*0Sstevel@tonic-gate #endif
438*0Sstevel@tonic-gate 
439*0Sstevel@tonic-gate #ifndef HAVE_SYSEXITS_H
440*0Sstevel@tonic-gate #include "exits.h"
441*0Sstevel@tonic-gate #else
442*0Sstevel@tonic-gate #include "sysexits.h"
443*0Sstevel@tonic-gate #endif
444*0Sstevel@tonic-gate 
445*0Sstevel@tonic-gate #ifndef	NI_WITHSCOPEID
446*0Sstevel@tonic-gate #define	NI_WITHSCOPEID	0
447*0Sstevel@tonic-gate #endif
448*0Sstevel@tonic-gate 
449*0Sstevel@tonic-gate /* Get the correct time.h */
450*0Sstevel@tonic-gate #if TIME_WITH_SYS_TIME
451*0Sstevel@tonic-gate # include <sys/time.h>
452*0Sstevel@tonic-gate # include <time.h>
453*0Sstevel@tonic-gate #else
454*0Sstevel@tonic-gate # if HAVE_SYS_TIME_H
455*0Sstevel@tonic-gate #  include <sys/time.h>
456*0Sstevel@tonic-gate # else
457*0Sstevel@tonic-gate #  include <time.h>
458*0Sstevel@tonic-gate # endif
459*0Sstevel@tonic-gate #endif
460*0Sstevel@tonic-gate 
461*0Sstevel@tonic-gate #include <libintl.h>
462*0Sstevel@tonic-gate /*
463*0Sstevel@tonic-gate  * We use gettext() so that xgettext will build msg database. libsasl and
464*0Sstevel@tonic-gate  * plugins will actually use dgettext in the appropriate subroutine -
465*0Sstevel@tonic-gate  * depending on SASL_CB_LANGUAGE or the specified language.
466*0Sstevel@tonic-gate  */
467*0Sstevel@tonic-gate #define gettext(x) (x)
468*0Sstevel@tonic-gate 
469*0Sstevel@tonic-gate #define USE_PTHREADS 1
470*0Sstevel@tonic-gate #include <pthread.h>
471*0Sstevel@tonic-gate #define	DEFINE_STATIC_MUTEX(x) \
472*0Sstevel@tonic-gate 	static pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER
473*0Sstevel@tonic-gate 
474*0Sstevel@tonic-gate #define	LOCK_MUTEX(x)	pthread_mutex_lock(x)
475*0Sstevel@tonic-gate #define	UNLOCK_MUTEX(x)	pthread_mutex_unlock(x)
476*0Sstevel@tonic-gate 
477*0Sstevel@tonic-gate #define	DO_DLOPEN 1
478*0Sstevel@tonic-gate #define	TRY_DLOPEN_WHEN_STATIC 1
479*0Sstevel@tonic-gate #define	HAVE_DLFCN_H 1
480*0Sstevel@tonic-gate 
481*0Sstevel@tonic-gate /* HAVE_GSS_C_NT_USER_NAME is not needed for Solaris 10 since libgss has been
482*0Sstevel@tonic-gate  * updated.
483*0Sstevel@tonic-gate  */
484*0Sstevel@tonic-gate #undef HAVE_GSS_C_NT_USER_NAME
485*0Sstevel@tonic-gate 
486*0Sstevel@tonic-gate #define	HAVE_RPC_GSS_MECH_TO_OID 1
487*0Sstevel@tonic-gate 
488*0Sstevel@tonic-gate #define	_SUN_SDK_ 1
489*0Sstevel@tonic-gate 
490*0Sstevel@tonic-gate #define _INTEGRATED_SOLARIS_ 1
491*0Sstevel@tonic-gate #define _HAVE_LIB_MD5 1
492*0Sstevel@tonic-gate 
493*0Sstevel@tonic-gate #include "md5global.h"
494*0Sstevel@tonic-gate #include "md5_private.h"
495*0Sstevel@tonic-gate 
496*0Sstevel@tonic-gate #endif /* CONFIG_H */
497