2 * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
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.
9 * $Id: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $
12 #pragma ident "%Z%%M% %I% %E% SMI"
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.
28 ** SM_CONF_STDBOOL_H is 1 if <stdbool.h> exists
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 */
40 ** Configuration macros that specify how __P is defined.
43 # ifndef SM_CONF_SYS_CDEFS_H
44 # define SM_CONF_SYS_CDEFS_H 0
45 # endif /* ! SM_CONF_SYS_CDEFS_H */
48 ** SM_CONF_STDDEF_H is 1 if <stddef.h> exists
51 # ifndef SM_CONF_STDDEF_H
52 # define SM_CONF_STDDEF_H 1
53 # endif /* ! SM_CONF_STDDEF_H */
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).
62 # define SM_CONF_STRL 0
63 # endif /* ! SM_CONF_STRL */
66 ** Configuration macro indicating that setitimer is available
69 # ifndef SM_CONF_SETITIMER
70 # define SM_CONF_SETITIMER 1
71 # endif /* ! SM_CONF_SETITIMER */
74 ** Does <sys/types.h> define uid_t and gid_t?
77 # ifndef SM_CONF_UID_GID
78 # define SM_CONF_UID_GID 1
79 # endif /* ! SM_CONF_UID_GID */
82 ** Does <sys/types.h> define ssize_t?
84 # ifndef SM_CONF_SSIZE_T
85 # define SM_CONF_SSIZE_T 1
86 # endif /* ! SM_CONF_SSIZE_T */
89 ** Does the C compiler support long long?
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 */
105 ** Does <sys/types.h> define quad_t and u_quad_t?
106 ** We only care if long long is not available.
109 # ifndef SM_CONF_QUAD_T
110 # define SM_CONF_QUAD_T 0
111 # endif /* ! SM_CONF_QUAD_T */
114 ** Configuration macro indicating that shared memory is available
118 # define SM_CONF_SHM 0
119 # endif /* ! SM_CONF_SHM */
122 ** Does <setjmp.h> define sigsetjmp?
125 # ifndef SM_CONF_SIGSETJMP
126 # define SM_CONF_SIGSETJMP 1
127 # endif /* ! SM_CONF_SIGSETJMP */
130 ** Does <sysexits.h> exist, and define the EX_* macros with values
131 ** that differ from the default BSD values in <sm/sysexits.h>?
134 # ifndef SM_CONF_SYSEXITS_H
135 # define SM_CONF_SYSEXITS_H 0
136 # endif /* ! SM_CONF_SYSEXITS_H */
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 */
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 */
153 /* Does the LDAP library have ldap_memfree()? */
154 # ifndef SM_CONF_LDAP_MEMFREE
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.
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 */
169 /* Does the LDAP library have ldap_initialize()? */
170 # ifndef SM_CONF_LDAP_INITIALIZE
173 ** Check for ldap_initialize() support for support for LDAP URI's with
174 ** non-ldap:// schemes.
177 /* OpenLDAP does it with LDAP_OPT_URI */
179 # define SM_CONF_LDAP_INITIALIZE 1
180 # endif /* LDAP_OPT_URI */
181 # endif /* !SM_CONF_LDAP_INITIALIZE */
182 # endif /* LDAPMAP */
184 /* don't use strcpy() */
185 # ifndef DO_NOT_USE_STRCPY
186 # define DO_NOT_USE_STRCPY 1
187 # endif /* ! DO_NOT_USE_STRCPY */
189 #endif /* ! SM_CONFIG_H */