140266059SGregory Neil Shapiro /* 25dd76dd0SGregory Neil Shapiro * Copyright (c) 2000-2003 Proofpoint, 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 * 94313cc83SGregory Neil Shapiro * $Id: config.h,v 1.49 2013-11-22 20:51:31 ca 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 27552d4955SGregory Neil Shapiro ** 28552d4955SGregory Neil Shapiro ** Note, unlike gcc, clang doesn't apply full prototypes to K&R definitions. 2940266059SGregory Neil Shapiro */ 3040266059SGregory Neil Shapiro 3140266059SGregory Neil Shapiro # ifndef SM_CONF_STDBOOL_H 32552d4955SGregory Neil Shapiro # if !defined(__clang__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 3340266059SGregory Neil Shapiro # define SM_CONF_STDBOOL_H 1 34*5b0945b5SGregory Neil Shapiro # else 3540266059SGregory Neil Shapiro # define SM_CONF_STDBOOL_H 0 36*5b0945b5SGregory Neil Shapiro # endif 3740266059SGregory Neil Shapiro # endif /* ! SM_CONF_STDBOOL_H */ 3840266059SGregory Neil Shapiro 3940266059SGregory Neil Shapiro /* 4040266059SGregory Neil Shapiro ** Configuration macros that specify how __P is defined. 4140266059SGregory Neil Shapiro */ 4240266059SGregory Neil Shapiro 4340266059SGregory Neil Shapiro # ifndef SM_CONF_SYS_CDEFS_H 4440266059SGregory Neil Shapiro # define SM_CONF_SYS_CDEFS_H 0 45*5b0945b5SGregory Neil Shapiro # endif 4640266059SGregory Neil Shapiro 4740266059SGregory Neil Shapiro /* 4840266059SGregory Neil Shapiro ** SM_CONF_STDDEF_H is 1 if <stddef.h> exists 4940266059SGregory Neil Shapiro */ 5040266059SGregory Neil Shapiro 5140266059SGregory Neil Shapiro # ifndef SM_CONF_STDDEF_H 5240266059SGregory Neil Shapiro # define SM_CONF_STDDEF_H 1 53*5b0945b5SGregory Neil Shapiro # endif 5440266059SGregory Neil Shapiro 5540266059SGregory Neil Shapiro /* 5640266059SGregory Neil Shapiro ** Configuration macro that specifies whether strlcpy/strlcat are available. 5740266059SGregory Neil Shapiro ** Note: this is the default so that the libsm version (optimized) will 5840266059SGregory Neil Shapiro ** be used by default (sm_strlcpy/sm_strlcat). 5940266059SGregory Neil Shapiro */ 6040266059SGregory Neil Shapiro 6140266059SGregory Neil Shapiro # ifndef SM_CONF_STRL 6240266059SGregory Neil Shapiro # define SM_CONF_STRL 0 63*5b0945b5SGregory Neil Shapiro # endif 6440266059SGregory Neil Shapiro 6540266059SGregory Neil Shapiro /* 6640266059SGregory Neil Shapiro ** Configuration macro indicating that setitimer is available 6740266059SGregory Neil Shapiro */ 6840266059SGregory Neil Shapiro 6940266059SGregory Neil Shapiro # ifndef SM_CONF_SETITIMER 7040266059SGregory Neil Shapiro # define SM_CONF_SETITIMER 1 71*5b0945b5SGregory Neil Shapiro # endif 7240266059SGregory Neil Shapiro 7340266059SGregory Neil Shapiro /* 7440266059SGregory Neil Shapiro ** Does <sys/types.h> define uid_t and gid_t? 7540266059SGregory Neil Shapiro */ 7640266059SGregory Neil Shapiro 7740266059SGregory Neil Shapiro # ifndef SM_CONF_UID_GID 7840266059SGregory Neil Shapiro # define SM_CONF_UID_GID 1 79*5b0945b5SGregory Neil Shapiro # endif 8040266059SGregory Neil Shapiro 8140266059SGregory Neil Shapiro /* 8240266059SGregory Neil Shapiro ** Does <sys/types.h> define ssize_t? 8340266059SGregory Neil Shapiro */ 8440266059SGregory Neil Shapiro # ifndef SM_CONF_SSIZE_T 8540266059SGregory Neil Shapiro # define SM_CONF_SSIZE_T 1 86*5b0945b5SGregory Neil Shapiro # endif 8740266059SGregory Neil Shapiro 8840266059SGregory Neil Shapiro /* 8940266059SGregory Neil Shapiro ** Does the C compiler support long long? 9040266059SGregory Neil Shapiro */ 9140266059SGregory Neil Shapiro 9240266059SGregory Neil Shapiro # ifndef SM_CONF_LONGLONG 9340266059SGregory Neil Shapiro # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 9440266059SGregory Neil Shapiro # define SM_CONF_LONGLONG 1 9540266059SGregory Neil Shapiro # else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ 9640266059SGregory Neil Shapiro # if defined(__GNUC__) 9740266059SGregory Neil Shapiro # define SM_CONF_LONGLONG 1 98*5b0945b5SGregory Neil Shapiro # else 9940266059SGregory Neil Shapiro # define SM_CONF_LONGLONG 0 100*5b0945b5SGregory Neil Shapiro # endif 10140266059SGregory Neil Shapiro # endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */ 10240266059SGregory Neil Shapiro # endif /* ! SM_CONF_LONGLONG */ 10340266059SGregory Neil Shapiro 10440266059SGregory Neil Shapiro /* 10540266059SGregory Neil Shapiro ** Does <sys/types.h> define quad_t and u_quad_t? 10640266059SGregory Neil Shapiro ** We only care if long long is not available. 10740266059SGregory Neil Shapiro */ 10840266059SGregory Neil Shapiro 10940266059SGregory Neil Shapiro # ifndef SM_CONF_QUAD_T 11040266059SGregory Neil Shapiro # define SM_CONF_QUAD_T 0 111*5b0945b5SGregory Neil Shapiro # endif 11240266059SGregory Neil Shapiro 11340266059SGregory Neil Shapiro /* 11440266059SGregory Neil Shapiro ** Configuration macro indicating that shared memory is available 11540266059SGregory Neil Shapiro */ 11640266059SGregory Neil Shapiro 11740266059SGregory Neil Shapiro # ifndef SM_CONF_SHM 11840266059SGregory Neil Shapiro # define SM_CONF_SHM 0 119*5b0945b5SGregory Neil Shapiro # endif 12040266059SGregory Neil Shapiro 12140266059SGregory Neil Shapiro /* 12240266059SGregory Neil Shapiro ** Does <setjmp.h> define sigsetjmp? 12340266059SGregory Neil Shapiro */ 12440266059SGregory Neil Shapiro 12540266059SGregory Neil Shapiro # ifndef SM_CONF_SIGSETJMP 12640266059SGregory Neil Shapiro # define SM_CONF_SIGSETJMP 1 127*5b0945b5SGregory Neil Shapiro # endif 12840266059SGregory Neil Shapiro 12940266059SGregory Neil Shapiro /* 13040266059SGregory Neil Shapiro ** Does <sysexits.h> exist, and define the EX_* macros with values 13140266059SGregory Neil Shapiro ** that differ from the default BSD values in <sm/sysexits.h>? 13240266059SGregory Neil Shapiro */ 13340266059SGregory Neil Shapiro 13440266059SGregory Neil Shapiro # ifndef SM_CONF_SYSEXITS_H 13540266059SGregory Neil Shapiro # define SM_CONF_SYSEXITS_H 0 136*5b0945b5SGregory Neil Shapiro # endif 13740266059SGregory Neil Shapiro 13840266059SGregory Neil Shapiro /* has memchr() prototype? (if not: needs memory.h) */ 13940266059SGregory Neil Shapiro # ifndef SM_CONF_MEMCHR 14040266059SGregory Neil Shapiro # define SM_CONF_MEMCHR 1 141*5b0945b5SGregory Neil Shapiro # endif 14240266059SGregory Neil Shapiro 14340266059SGregory Neil Shapiro /* try LLONG tests in libsm/t-types.c? */ 14440266059SGregory Neil Shapiro # ifndef SM_CONF_TEST_LLONG 14540266059SGregory Neil Shapiro # define SM_CONF_TEST_LLONG 1 146*5b0945b5SGregory Neil Shapiro # endif 14740266059SGregory Neil Shapiro 148e92d3f3fSGregory Neil Shapiro /* LDAP Checks */ 149e92d3f3fSGregory Neil Shapiro # if LDAPMAP 150b6bacd31SGregory Neil Shapiro # include <lber.h> 151e92d3f3fSGregory Neil Shapiro # include <ldap.h> 152e92d3f3fSGregory Neil Shapiro 153e92d3f3fSGregory Neil Shapiro /* Does the LDAP library have ldap_memfree()? */ 154605302a5SGregory Neil Shapiro # ifndef SM_CONF_LDAP_MEMFREE 155605302a5SGregory Neil Shapiro 156605302a5SGregory Neil Shapiro /* 157605302a5SGregory Neil Shapiro ** The new LDAP C API (draft-ietf-ldapext-ldap-c-api-04.txt) includes 158605302a5SGregory Neil Shapiro ** ldap_memfree() in the API. That draft states to use LDAP_API_VERSION 159605302a5SGregory Neil Shapiro ** of 2004 to identify the API. 160605302a5SGregory Neil Shapiro */ 161605302a5SGregory Neil Shapiro 162605302a5SGregory Neil Shapiro # if USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 163605302a5SGregory Neil Shapiro # define SM_CONF_LDAP_MEMFREE 1 164*5b0945b5SGregory Neil Shapiro # else 165605302a5SGregory Neil Shapiro # define SM_CONF_LDAP_MEMFREE 0 166*5b0945b5SGregory Neil Shapiro # endif 167605302a5SGregory Neil Shapiro # endif /* ! SM_CONF_LDAP_MEMFREE */ 168605302a5SGregory Neil Shapiro 169e92d3f3fSGregory Neil Shapiro /* Does the LDAP library have ldap_initialize()? */ 170e92d3f3fSGregory Neil Shapiro # ifndef SM_CONF_LDAP_INITIALIZE 171e92d3f3fSGregory Neil Shapiro 172e92d3f3fSGregory Neil Shapiro /* 173e92d3f3fSGregory Neil Shapiro ** Check for ldap_initialize() support for support for LDAP URI's with 174e92d3f3fSGregory Neil Shapiro ** non-ldap:// schemes. 175e92d3f3fSGregory Neil Shapiro */ 176e92d3f3fSGregory Neil Shapiro 177e92d3f3fSGregory Neil Shapiro /* OpenLDAP does it with LDAP_OPT_URI */ 178e92d3f3fSGregory Neil Shapiro # ifdef LDAP_OPT_URI 179e92d3f3fSGregory Neil Shapiro # define SM_CONF_LDAP_INITIALIZE 1 180*5b0945b5SGregory Neil Shapiro # endif 181e92d3f3fSGregory Neil Shapiro # endif /* !SM_CONF_LDAP_INITIALIZE */ 182e92d3f3fSGregory Neil Shapiro # endif /* LDAPMAP */ 183e92d3f3fSGregory Neil Shapiro 184e92d3f3fSGregory Neil Shapiro /* don't use strcpy() */ 185e92d3f3fSGregory Neil Shapiro # ifndef DO_NOT_USE_STRCPY 186e92d3f3fSGregory Neil Shapiro # define DO_NOT_USE_STRCPY 1 187*5b0945b5SGregory Neil Shapiro # endif 188e92d3f3fSGregory Neil Shapiro 18940266059SGregory Neil Shapiro #endif /* ! SM_CONFIG_H */ 190