xref: /freebsd/contrib/sendmail/include/sm/config.h (revision 605302a5c9939b7eeda0a31f38901d9a8348e8cb)
140266059SGregory Neil Shapiro /*
240266059SGregory Neil Shapiro  * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
340266059SGregory Neil Shapiro  *	All rights reserved.
440266059SGregory Neil Shapiro  *
540266059SGregory Neil Shapiro  * By using this file, you agree to the terms and conditions set
640266059SGregory Neil Shapiro  * forth in the LICENSE file which can be found at the top level of
740266059SGregory Neil Shapiro  * the sendmail distribution.
840266059SGregory Neil Shapiro  *
9605302a5SGregory Neil Shapiro  *	$Id: config.h,v 1.44 2002/01/23 17:47:15 gshapiro Exp $
1040266059SGregory Neil Shapiro  */
1140266059SGregory Neil Shapiro 
1240266059SGregory Neil Shapiro /*
1340266059SGregory Neil Shapiro **  libsm configuration macros.
1440266059SGregory Neil Shapiro **  The values of these macros are platform dependent.
1540266059SGregory Neil Shapiro **  The default values are given here.
1640266059SGregory Neil Shapiro **  If the default is incorrect, then the correct value can be specified
1740266059SGregory Neil Shapiro **  in the m4 configuration file in devtools/OS.
1840266059SGregory Neil Shapiro */
1940266059SGregory Neil Shapiro 
2040266059SGregory Neil Shapiro #ifndef SM_CONFIG_H
2140266059SGregory Neil Shapiro # define SM_CONFIG_H
2240266059SGregory Neil Shapiro 
2340266059SGregory Neil Shapiro #  include "sm_os.h"
2440266059SGregory Neil Shapiro 
2540266059SGregory Neil Shapiro /*
2640266059SGregory Neil Shapiro **  SM_CONF_STDBOOL_H is 1 if <stdbool.h> exists
2740266059SGregory Neil Shapiro */
2840266059SGregory Neil Shapiro 
2940266059SGregory Neil Shapiro # ifndef SM_CONF_STDBOOL_H
3040266059SGregory Neil Shapiro #  if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
3140266059SGregory Neil Shapiro #   define SM_CONF_STDBOOL_H		1
3240266059SGregory Neil Shapiro #  else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
3340266059SGregory Neil Shapiro #   define SM_CONF_STDBOOL_H		0
3440266059SGregory Neil Shapiro #  endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
3540266059SGregory Neil Shapiro # endif /* ! SM_CONF_STDBOOL_H */
3640266059SGregory Neil Shapiro 
3740266059SGregory Neil Shapiro /*
3840266059SGregory Neil Shapiro **  Configuration macros that specify how __P is defined.
3940266059SGregory Neil Shapiro */
4040266059SGregory Neil Shapiro 
4140266059SGregory Neil Shapiro # ifndef SM_CONF_SYS_CDEFS_H
4240266059SGregory Neil Shapiro #  define SM_CONF_SYS_CDEFS_H		0
4340266059SGregory Neil Shapiro # endif /* ! SM_CONF_SYS_CDEFS_H */
4440266059SGregory Neil Shapiro 
4540266059SGregory Neil Shapiro /*
4640266059SGregory Neil Shapiro **  SM_CONF_STDDEF_H is 1 if <stddef.h> exists
4740266059SGregory Neil Shapiro */
4840266059SGregory Neil Shapiro 
4940266059SGregory Neil Shapiro # ifndef SM_CONF_STDDEF_H
5040266059SGregory Neil Shapiro #  define SM_CONF_STDDEF_H		1
5140266059SGregory Neil Shapiro # endif /* ! SM_CONF_STDDEF_H */
5240266059SGregory Neil Shapiro 
5340266059SGregory Neil Shapiro /*
5440266059SGregory Neil Shapiro **  Configuration macro that specifies whether strlcpy/strlcat are available.
5540266059SGregory Neil Shapiro **  Note: this is the default so that the libsm version (optimized) will
5640266059SGregory Neil Shapiro **  be used by default (sm_strlcpy/sm_strlcat).
5740266059SGregory Neil Shapiro */
5840266059SGregory Neil Shapiro 
5940266059SGregory Neil Shapiro # ifndef SM_CONF_STRL
6040266059SGregory Neil Shapiro #  define SM_CONF_STRL			0
6140266059SGregory Neil Shapiro # endif /* ! SM_CONF_STRL */
6240266059SGregory Neil Shapiro 
6340266059SGregory Neil Shapiro /*
6440266059SGregory Neil Shapiro **  Configuration macro indicating that setitimer is available
6540266059SGregory Neil Shapiro */
6640266059SGregory Neil Shapiro 
6740266059SGregory Neil Shapiro # ifndef SM_CONF_SETITIMER
6840266059SGregory Neil Shapiro #  define SM_CONF_SETITIMER		1
6940266059SGregory Neil Shapiro # endif /* ! SM_CONF_SETITIMER */
7040266059SGregory Neil Shapiro 
7140266059SGregory Neil Shapiro /*
7240266059SGregory Neil Shapiro **  Does <sys/types.h> define uid_t and gid_t?
7340266059SGregory Neil Shapiro */
7440266059SGregory Neil Shapiro 
7540266059SGregory Neil Shapiro # ifndef SM_CONF_UID_GID
7640266059SGregory Neil Shapiro #  define SM_CONF_UID_GID		1
7740266059SGregory Neil Shapiro # endif /* ! SM_CONF_UID_GID */
7840266059SGregory Neil Shapiro 
7940266059SGregory Neil Shapiro /*
8040266059SGregory Neil Shapiro **  Does <sys/types.h> define ssize_t?
8140266059SGregory Neil Shapiro */
8240266059SGregory Neil Shapiro # ifndef SM_CONF_SSIZE_T
8340266059SGregory Neil Shapiro #  define SM_CONF_SSIZE_T		1
8440266059SGregory Neil Shapiro # endif /* ! SM_CONF_SSIZE_T */
8540266059SGregory Neil Shapiro 
8640266059SGregory Neil Shapiro /*
8740266059SGregory Neil Shapiro **  Does the C compiler support long long?
8840266059SGregory Neil Shapiro */
8940266059SGregory Neil Shapiro 
9040266059SGregory Neil Shapiro # ifndef SM_CONF_LONGLONG
9140266059SGregory Neil Shapiro #  if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
9240266059SGregory Neil Shapiro #   define SM_CONF_LONGLONG		1
9340266059SGregory Neil Shapiro #  else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
9440266059SGregory Neil Shapiro #   if defined(__GNUC__)
9540266059SGregory Neil Shapiro #    define SM_CONF_LONGLONG		1
9640266059SGregory Neil Shapiro #   else /* defined(__GNUC__) */
9740266059SGregory Neil Shapiro #    define SM_CONF_LONGLONG		0
9840266059SGregory Neil Shapiro #   endif /* defined(__GNUC__) */
9940266059SGregory Neil Shapiro #  endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
10040266059SGregory Neil Shapiro # endif /* ! SM_CONF_LONGLONG */
10140266059SGregory Neil Shapiro 
10240266059SGregory Neil Shapiro /*
10340266059SGregory Neil Shapiro **  Does <sys/types.h> define quad_t and u_quad_t?
10440266059SGregory Neil Shapiro **  We only care if long long is not available.
10540266059SGregory Neil Shapiro */
10640266059SGregory Neil Shapiro 
10740266059SGregory Neil Shapiro # ifndef SM_CONF_QUAD_T
10840266059SGregory Neil Shapiro #  define SM_CONF_QUAD_T		0
10940266059SGregory Neil Shapiro # endif /* ! SM_CONF_QUAD_T */
11040266059SGregory Neil Shapiro 
11140266059SGregory Neil Shapiro /*
11240266059SGregory Neil Shapiro **  Configuration macro indicating that shared memory is available
11340266059SGregory Neil Shapiro */
11440266059SGregory Neil Shapiro 
11540266059SGregory Neil Shapiro # ifndef SM_CONF_SHM
11640266059SGregory Neil Shapiro #  define SM_CONF_SHM		0
11740266059SGregory Neil Shapiro # endif /* ! SM_CONF_SHM */
11840266059SGregory Neil Shapiro 
11940266059SGregory Neil Shapiro /*
12040266059SGregory Neil Shapiro **  Does <setjmp.h> define sigsetjmp?
12140266059SGregory Neil Shapiro */
12240266059SGregory Neil Shapiro 
12340266059SGregory Neil Shapiro # ifndef SM_CONF_SIGSETJMP
12440266059SGregory Neil Shapiro #  define SM_CONF_SIGSETJMP	1
12540266059SGregory Neil Shapiro # endif /* ! SM_CONF_SIGSETJMP */
12640266059SGregory Neil Shapiro 
12740266059SGregory Neil Shapiro /*
12840266059SGregory Neil Shapiro **  Does <sysexits.h> exist, and define the EX_* macros with values
12940266059SGregory Neil Shapiro **  that differ from the default BSD values in <sm/sysexits.h>?
13040266059SGregory Neil Shapiro */
13140266059SGregory Neil Shapiro 
13240266059SGregory Neil Shapiro # ifndef SM_CONF_SYSEXITS_H
13340266059SGregory Neil Shapiro #  define SM_CONF_SYSEXITS_H	0
13440266059SGregory Neil Shapiro # endif /* ! SM_CONF_SYSEXITS_H */
13540266059SGregory Neil Shapiro 
13640266059SGregory Neil Shapiro /* has memchr() prototype? (if not: needs memory.h) */
13740266059SGregory Neil Shapiro # ifndef SM_CONF_MEMCHR
13840266059SGregory Neil Shapiro #  define SM_CONF_MEMCHR	1
13940266059SGregory Neil Shapiro # endif /* ! SM_CONF_MEMCHR */
14040266059SGregory Neil Shapiro 
14140266059SGregory Neil Shapiro /* try LLONG tests in libsm/t-types.c? */
14240266059SGregory Neil Shapiro # ifndef SM_CONF_TEST_LLONG
14340266059SGregory Neil Shapiro #  define SM_CONF_TEST_LLONG	1
14440266059SGregory Neil Shapiro # endif /* !SM_CONF_TEST_LLONG */
14540266059SGregory Neil Shapiro 
146605302a5SGregory Neil Shapiro /* Does LDAP library have ldap_memfree()? */
147605302a5SGregory Neil Shapiro # ifndef SM_CONF_LDAP_MEMFREE
148605302a5SGregory Neil Shapiro 
149605302a5SGregory Neil Shapiro /*
150605302a5SGregory Neil Shapiro **  The new LDAP C API (draft-ietf-ldapext-ldap-c-api-04.txt) includes
151605302a5SGregory Neil Shapiro **  ldap_memfree() in the API.  That draft states to use LDAP_API_VERSION
152605302a5SGregory Neil Shapiro **  of 2004 to identify the API.
153605302a5SGregory Neil Shapiro */
154605302a5SGregory Neil Shapiro 
155605302a5SGregory Neil Shapiro #  if USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004
156605302a5SGregory Neil Shapiro #   define SM_CONF_LDAP_MEMFREE	1
157605302a5SGregory Neil Shapiro #  else /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
158605302a5SGregory Neil Shapiro #   define SM_CONF_LDAP_MEMFREE	0
159605302a5SGregory Neil Shapiro #  endif /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
160605302a5SGregory Neil Shapiro # endif /* ! SM_CONF_LDAP_MEMFREE */
161605302a5SGregory Neil Shapiro 
16240266059SGregory Neil Shapiro #endif /* ! SM_CONFIG_H */
163