sm_os_linux.h revision 261363
1263646Sbapt/*
2263646Sbapt * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
3263646Sbapt *	All rights reserved.
4263646Sbapt *
5263646Sbapt * By using this file, you agree to the terms and conditions set
6263646Sbapt * forth in the LICENSE file which can be found at the top level of
7263646Sbapt * the sendmail distribution.
8263646Sbapt *
9263646Sbapt *	$Id: sm_os_linux.h,v 1.13 2013/11/22 20:51:34 ca Exp $
10263646Sbapt */
11263646Sbapt
12263646Sbapt/*
13263646Sbapt**  Platform definitions for Linux
14263646Sbapt*/
15263646Sbapt
16263646Sbapt#define SM_OS_NAME	"linux"
17263646Sbapt
18263646Sbapt/* to get version number */
19263646Sbapt#include <linux/version.h>
20263646Sbapt
21263646Sbapt# if !defined(KERNEL_VERSION)	/* not defined in 2.0.x kernel series */
22263646Sbapt#  define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
23263646Sbapt# endif /* ! KERNEL_VERSION */
24263646Sbapt
25263646Sbapt/* doesn't seem to work on Linux */
26263646Sbapt#ifndef SM_CONF_SETITIMER
27263646Sbapt# define SM_CONF_SETITIMER	0
28263646Sbapt#endif /* SM_CONF_SETITIMER */
29263646Sbapt
30263646Sbapt#ifndef SM_CONF_SHM
31263646Sbapt# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,19))
32263646Sbapt#  define SM_CONF_SHM	1
33263646Sbapt# endif /* LINUX_VERSION_CODE */
34263646Sbapt#endif /* SM_CONF_SHM */
35263646Sbapt
36263646Sbapt#define SM_CONF_SYS_CDEFS_H	1
37263646Sbapt#ifndef SM_CONF_SEM
38263646Sbapt# define SM_CONF_SEM	2
39263646Sbapt#endif /* SM_CONF_SEM */
40263646Sbapt#ifndef SM_CONF_MSG
41263646Sbapt# define SM_CONF_MSG	1
42263646Sbapt#endif /* SM_CONF_MSG */
43263646Sbapt