xref: /titanic_41/usr/src/cmd/sendmail/include/sm/config.h (revision ea394cb00fd96864e34d2841b4a22357b621c78f)
1 /*
2  * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
3  *	All rights reserved.
4  *
5  * By using this file, you agree to the terms and conditions set
6  * forth in the LICENSE file which can be found at the top level of
7  * the sendmail distribution.
8  *
9  *	$Id: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $
10  */
11 
12 #pragma ident	"%Z%%M%	%I%	%E% SMI"
13 
14 /*
15 **  libsm configuration macros.
16 **  The values of these macros are platform dependent.
17 **  The default values are given here.
18 **  If the default is incorrect, then the correct value can be specified
19 **  in the m4 configuration file in devtools/OS.
20 */
21 
22 #ifndef SM_CONFIG_H
23 # define SM_CONFIG_H
24 
25 #  include "sm_os.h"
26 
27 /*
28 **  SM_CONF_STDBOOL_H is 1 if <stdbool.h> exists
29 */
30 
31 # ifndef SM_CONF_STDBOOL_H
32 #  if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
33 #   define SM_CONF_STDBOOL_H		1
34 #  else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
35 #   define SM_CONF_STDBOOL_H		0
36 #  endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
37 # endif /* ! SM_CONF_STDBOOL_H */
38 
39 /*
40 **  Configuration macros that specify how __P is defined.
41 */
42 
43 # ifndef SM_CONF_SYS_CDEFS_H
44 #  define SM_CONF_SYS_CDEFS_H		0
45 # endif /* ! SM_CONF_SYS_CDEFS_H */
46 
47 /*
48 **  SM_CONF_STDDEF_H is 1 if <stddef.h> exists
49 */
50 
51 # ifndef SM_CONF_STDDEF_H
52 #  define SM_CONF_STDDEF_H		1
53 # endif /* ! SM_CONF_STDDEF_H */
54 
55 /*
56 **  Configuration macro that specifies whether strlcpy/strlcat are available.
57 **  Note: this is the default so that the libsm version (optimized) will
58 **  be used by default (sm_strlcpy/sm_strlcat).
59 */
60 
61 # ifndef SM_CONF_STRL
62 #  define SM_CONF_STRL			0
63 # endif /* ! SM_CONF_STRL */
64 
65 /*
66 **  Configuration macro indicating that setitimer is available
67 */
68 
69 # ifndef SM_CONF_SETITIMER
70 #  define SM_CONF_SETITIMER		1
71 # endif /* ! SM_CONF_SETITIMER */
72 
73 /*
74 **  Does <sys/types.h> define uid_t and gid_t?
75 */
76 
77 # ifndef SM_CONF_UID_GID
78 #  define SM_CONF_UID_GID		1
79 # endif /* ! SM_CONF_UID_GID */
80 
81 /*
82 **  Does <sys/types.h> define ssize_t?
83 */
84 # ifndef SM_CONF_SSIZE_T
85 #  define SM_CONF_SSIZE_T		1
86 # endif /* ! SM_CONF_SSIZE_T */
87 
88 /*
89 **  Does the C compiler support long long?
90 */
91 
92 # ifndef SM_CONF_LONGLONG
93 #  if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
94 #   define SM_CONF_LONGLONG		1
95 #  else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
96 #   if defined(__GNUC__)
97 #    define SM_CONF_LONGLONG		1
98 #   else /* defined(__GNUC__) */
99 #    define SM_CONF_LONGLONG		0
100 #   endif /* defined(__GNUC__) */
101 #  endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
102 # endif /* ! SM_CONF_LONGLONG */
103 
104 /*
105 **  Does <sys/types.h> define quad_t and u_quad_t?
106 **  We only care if long long is not available.
107 */
108 
109 # ifndef SM_CONF_QUAD_T
110 #  define SM_CONF_QUAD_T		0
111 # endif /* ! SM_CONF_QUAD_T */
112 
113 /*
114 **  Configuration macro indicating that shared memory is available
115 */
116 
117 # ifndef SM_CONF_SHM
118 #  define SM_CONF_SHM		0
119 # endif /* ! SM_CONF_SHM */
120 
121 /*
122 **  Does <setjmp.h> define sigsetjmp?
123 */
124 
125 # ifndef SM_CONF_SIGSETJMP
126 #  define SM_CONF_SIGSETJMP	1
127 # endif /* ! SM_CONF_SIGSETJMP */
128 
129 /*
130 **  Does <sysexits.h> exist, and define the EX_* macros with values
131 **  that differ from the default BSD values in <sm/sysexits.h>?
132 */
133 
134 # ifndef SM_CONF_SYSEXITS_H
135 #  define SM_CONF_SYSEXITS_H	0
136 # endif /* ! SM_CONF_SYSEXITS_H */
137 
138 /* has memchr() prototype? (if not: needs memory.h) */
139 # ifndef SM_CONF_MEMCHR
140 #  define SM_CONF_MEMCHR	1
141 # endif /* ! SM_CONF_MEMCHR */
142 
143 /* try LLONG tests in libsm/t-types.c? */
144 # ifndef SM_CONF_TEST_LLONG
145 #  define SM_CONF_TEST_LLONG	1
146 # endif /* !SM_CONF_TEST_LLONG */
147 
148 /* LDAP Checks */
149 # if LDAPMAP
150 #  include <lber.h>
151 #  include <ldap.h>
152 
153 /* Does the LDAP library have ldap_memfree()? */
154 #  ifndef SM_CONF_LDAP_MEMFREE
155 
156 /*
157 **  The new LDAP C API (draft-ietf-ldapext-ldap-c-api-04.txt) includes
158 **  ldap_memfree() in the API.  That draft states to use LDAP_API_VERSION
159 **  of 2004 to identify the API.
160 */
161 
162 #   if USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004
163 #    define SM_CONF_LDAP_MEMFREE	1
164 #   else /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
165 #    define SM_CONF_LDAP_MEMFREE	0
166 #   endif /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
167 #  endif /* ! SM_CONF_LDAP_MEMFREE */
168 
169 /* Does the LDAP library have ldap_initialize()? */
170 #  ifndef SM_CONF_LDAP_INITIALIZE
171 
172 /*
173 **  Check for ldap_initialize() support for support for LDAP URI's with
174 **  non-ldap:// schemes.
175 */
176 
177 /* OpenLDAP does it with LDAP_OPT_URI */
178 #   ifdef LDAP_OPT_URI
179 #    define SM_CONF_LDAP_INITIALIZE	1
180 #   endif /* LDAP_OPT_URI */
181 #  endif /* !SM_CONF_LDAP_INITIALIZE */
182 # endif /* LDAPMAP */
183 
184 /* don't use strcpy() */
185 # ifndef DO_NOT_USE_STRCPY
186 #  define DO_NOT_USE_STRCPY	1
187 # endif /* ! DO_NOT_USE_STRCPY */
188 
189 #endif /* ! SM_CONFIG_H */
190