140266059SGregory Neil Shapiro /* 25dd76dd0SGregory Neil Shapiro * Copyright (c) 2000-2003, 2005 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: shm.h,v 1.12 2013-11-22 20:51:31 ca Exp $ 1040266059SGregory Neil Shapiro */ 1140266059SGregory Neil Shapiro 1240266059SGregory Neil Shapiro #ifndef SM_SHM_H 1340266059SGregory Neil Shapiro # define SM_SHM_H 1440266059SGregory Neil Shapiro 1540266059SGregory Neil Shapiro # if SM_CONF_SHM 1640266059SGregory Neil Shapiro # include <sys/types.h> 1740266059SGregory Neil Shapiro # include <sys/ipc.h> 1840266059SGregory Neil Shapiro # include <sys/shm.h> 1940266059SGregory Neil Shapiro 2040266059SGregory Neil Shapiro /* # include "def.h" */ 2140266059SGregory Neil Shapiro 2240266059SGregory Neil Shapiro /* key for shared memory */ 2340266059SGregory Neil Shapiro # define SM_SHM_KEY ((key_t) 42) 2440266059SGregory Neil Shapiro 2540266059SGregory Neil Shapiro /* return value for failed shmget() */ 2640266059SGregory Neil Shapiro # define SM_SHM_NULL ((void *) -1) 2794c01205SGregory Neil Shapiro # define SM_SHM_NO_ID (-2) 2840266059SGregory Neil Shapiro 2940266059SGregory Neil Shapiro extern void *sm_shmstart __P((key_t, int , int , int *, bool)); 3040266059SGregory Neil Shapiro extern int sm_shmstop __P((void *, int, bool)); 31*2fb4f839SGregory Neil Shapiro extern int sm_shmsetowner __P((int, uid_t, gid_t, MODE_T)); 3240266059SGregory Neil Shapiro 33a7ec597cSGregory Neil Shapiro 3440266059SGregory Neil Shapiro /* for those braindead systems... (e.g., SunOS 4) */ 3540266059SGregory Neil Shapiro # ifndef SHM_R 3640266059SGregory Neil Shapiro # define SHM_R 0400 375b0945b5SGregory Neil Shapiro # endif 3840266059SGregory Neil Shapiro # ifndef SHM_W 3940266059SGregory Neil Shapiro # define SHM_W 0200 405b0945b5SGregory Neil Shapiro # endif 4140266059SGregory Neil Shapiro 4240266059SGregory Neil Shapiro # endif /* SM_CONF_SHM */ 4340266059SGregory Neil Shapiro #endif /* ! SM_SHM_H */ 44