190792Sgshapiro/*
2261363Sgshapiro * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
390792Sgshapiro *	All rights reserved.
490792Sgshapiro *
590792Sgshapiro * By using this file, you agree to the terms and conditions set
690792Sgshapiro * forth in the LICENSE file which can be found at the top level of
790792Sgshapiro * the sendmail distribution.
890792Sgshapiro *
9266692Sgshapiro *	$Id: sm_os_linux.h,v 1.13 2013-11-22 20:51:34 ca Exp $
1090792Sgshapiro */
1190792Sgshapiro
1290792Sgshapiro/*
1390792Sgshapiro**  Platform definitions for Linux
1490792Sgshapiro*/
1590792Sgshapiro
1690792Sgshapiro#define SM_OS_NAME	"linux"
1790792Sgshapiro
1890792Sgshapiro/* to get version number */
1990792Sgshapiro#include <linux/version.h>
2090792Sgshapiro
2190792Sgshapiro# if !defined(KERNEL_VERSION)	/* not defined in 2.0.x kernel series */
2290792Sgshapiro#  define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
2390792Sgshapiro# endif /* ! KERNEL_VERSION */
2490792Sgshapiro
2590792Sgshapiro/* doesn't seem to work on Linux */
2690792Sgshapiro#ifndef SM_CONF_SETITIMER
2790792Sgshapiro# define SM_CONF_SETITIMER	0
2890792Sgshapiro#endif /* SM_CONF_SETITIMER */
2990792Sgshapiro
3090792Sgshapiro#ifndef SM_CONF_SHM
3190792Sgshapiro# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,19))
3290792Sgshapiro#  define SM_CONF_SHM	1
3390792Sgshapiro# endif /* LINUX_VERSION_CODE */
3490792Sgshapiro#endif /* SM_CONF_SHM */
3590792Sgshapiro
3690792Sgshapiro#define SM_CONF_SYS_CDEFS_H	1
3790792Sgshapiro#ifndef SM_CONF_SEM
3890792Sgshapiro# define SM_CONF_SEM	2
3990792Sgshapiro#endif /* SM_CONF_SEM */
4090792Sgshapiro#ifndef SM_CONF_MSG
4190792Sgshapiro# define SM_CONF_MSG	1
4290792Sgshapiro#endif /* SM_CONF_MSG */
43