xref: /freebsd/contrib/sendmail/include/sm/os/sm_os_linux.h (revision ee7b0571c2c18bdec848ed2044223cc88db29bd8)
140266059SGregory Neil Shapiro /*
25dd76dd0SGregory Neil Shapiro  * Copyright (c) 2000-2001 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  *
9*4313cc83SGregory Neil Shapiro  *	$Id: sm_os_linux.h,v 1.13 2013-11-22 20:51:34 ca Exp $
1040266059SGregory Neil Shapiro  */
1140266059SGregory Neil Shapiro 
1240266059SGregory Neil Shapiro /*
1340266059SGregory Neil Shapiro **  Platform definitions for Linux
1440266059SGregory Neil Shapiro */
1540266059SGregory Neil Shapiro 
1640266059SGregory Neil Shapiro #define SM_OS_NAME	"linux"
1740266059SGregory Neil Shapiro 
1840266059SGregory Neil Shapiro /* to get version number */
1940266059SGregory Neil Shapiro #include <linux/version.h>
2040266059SGregory Neil Shapiro 
2140266059SGregory Neil Shapiro # if !defined(KERNEL_VERSION)	/* not defined in 2.0.x kernel series */
2240266059SGregory Neil Shapiro #  define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
2340266059SGregory Neil Shapiro # endif /* ! KERNEL_VERSION */
2440266059SGregory Neil Shapiro 
2540266059SGregory Neil Shapiro /* doesn't seem to work on Linux */
2640266059SGregory Neil Shapiro #ifndef SM_CONF_SETITIMER
2740266059SGregory Neil Shapiro # define SM_CONF_SETITIMER	0
2840266059SGregory Neil Shapiro #endif /* SM_CONF_SETITIMER */
2940266059SGregory Neil Shapiro 
3040266059SGregory Neil Shapiro #ifndef SM_CONF_SHM
3140266059SGregory Neil Shapiro # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,19))
3240266059SGregory Neil Shapiro #  define SM_CONF_SHM	1
3340266059SGregory Neil Shapiro # endif /* LINUX_VERSION_CODE */
3440266059SGregory Neil Shapiro #endif /* SM_CONF_SHM */
3540266059SGregory Neil Shapiro 
3640266059SGregory Neil Shapiro #define SM_CONF_SYS_CDEFS_H	1
3740266059SGregory Neil Shapiro #ifndef SM_CONF_SEM
3840266059SGregory Neil Shapiro # define SM_CONF_SEM	2
3940266059SGregory Neil Shapiro #endif /* SM_CONF_SEM */
4040266059SGregory Neil Shapiro #ifndef SM_CONF_MSG
4140266059SGregory Neil Shapiro # define SM_CONF_MSG	1
4240266059SGregory Neil Shapiro #endif /* SM_CONF_MSG */
43