diff options
Diffstat (limited to 'contrib/sendmail/include')
-rw-r--r-- | contrib/sendmail/include/sm/conf.h | 22 | ||||
-rw-r--r-- | contrib/sendmail/include/sm/sem.h | 59 | ||||
-rw-r--r-- | contrib/sendmail/include/sm/shm.h | 5 |
3 files changed, 77 insertions, 9 deletions
diff --git a/contrib/sendmail/include/sm/conf.h b/contrib/sendmail/include/sm/conf.h index fa3801e00832..087ccd12fee5 100644 --- a/contrib/sendmail/include/sm/conf.h +++ b/contrib/sendmail/include/sm/conf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Id: conf.h,v 1.118 2004/08/20 20:30:32 ca Exp $ + * $Id: conf.h,v 1.120 2005/03/22 22:07:53 ca Exp $ */ /* @@ -161,6 +161,8 @@ extern void hard_syslog(); # ifdef _AIX5 # define _AIX4 40300 +# define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */ +# define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */ # if _AIX5 >= 50200 # define HASUNSETENV 1 /* has unsetenv(3) call */ # endif /* _AIX5 >= 50200 */ @@ -175,10 +177,14 @@ extern void hard_syslog(); # define BSD4_4_SOCKADDR /* has sa_len */ # define USESETEUID 1 /* seteuid(2) works */ # define TZ_TYPE TZ_NAME /* use tzname[] vector */ -# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */ +# ifndef SOCKOPT_LEN_T +# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */ +# endif /* SOCKOPT_LEN_T */ # if _AIX4 >= 40200 # define HASSETREUID 1 /* setreuid(2) works as of AIX 4.2 */ -# define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */ +# ifndef SOCKADDR_LEN_T +# define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */ +# endif /* SOCKADDR_LEN_T */ # endif /* _AIX4 >= 40200 */ # if defined(_ILS_MACROS) /* IBM versions aren't side-effect clean */ # undef isascii @@ -208,7 +214,9 @@ extern void hard_syslog(); # define GIDSET_T gid_t # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ # define SPT_PADCHAR '\0' /* pad process title with nulls */ -# define LA_TYPE LA_INT +# ifndef LA_TYPE +# define LA_TYPE LA_INT +# endif /* LA_TYPE */ # define FSHIFT 16 # define LA_AVENRUN "avenrun" # if !defined(_AIX4) || _AIX4 < 40300 @@ -1125,7 +1133,7 @@ typedef short pid_t; # define _SCO_unix_4_2 # else /* ! _SCO_unix_4_2 */ # define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */ -# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */ +# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */ # endif /* ! _SCO_unix_4_2 */ # endif /* _SCO_DS >= 1 */ @@ -1819,7 +1827,7 @@ extern struct passwd * sendmail_mpe_getpwuid __P((uid_t)); # define HASWAITPID 1 # define HASGETDTABLESIZE 1 # define GIDSET_T gid_t -# define SOCKADDR_LEN_T size_t +# define SOCKADDR_LEN_T size_t # define SOCKOPT_LEN_T size_t # ifndef _PATH_UNIX # define _PATH_UNIX "/stand/unix" diff --git a/contrib/sendmail/include/sm/sem.h b/contrib/sendmail/include/sm/sem.h new file mode 100644 index 000000000000..7b691a43adc5 --- /dev/null +++ b/contrib/sendmail/include/sm/sem.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2000-2001, 2005 Sendmail, Inc. and its suppliers. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set + * forth in the LICENSE file which can be found at the top level of + * the sendmail distribution. + * + * $Id: sem.h,v 1.9 2005/02/17 22:08:58 ca Exp $ + */ + +#ifndef SM_SEM_H +# define SM_SEM_H 1 + +#include <sm/gen.h> + +/* key for semaphores */ +# define SM_SEM_KEY (41L) +# define SM_SEM_NO_ID (-1) +# define SM_NO_SEM(id) ((id) < 0) + +# if SM_CONF_SEM > 0 +# include <sys/types.h> +# include <sys/ipc.h> +# include <sys/sem.h> + +# if SM_CONF_SEM == 2 +union semun +{ + int val; + struct semid_ds *buf; + ushort *array; +}; +# endif /* SM_CONF_SEM == 2 */ + +# ifndef SEM_A +# define SEM_A 0200 +# endif /* SEM_A */ +# ifndef SEM_R +# define SEM_R 0400 +# endif /* SEM_R */ + +# define SM_NSEM 1 + +extern int sm_sem_start __P((key_t, int, int, bool)); +extern int sm_sem_stop __P((int)); +extern int sm_sem_acq __P((int, int, int)); +extern int sm_sem_rel __P((int, int, int)); +extern int sm_sem_get __P((int, int)); + +# else /* SM_CONF_SEM > 0 */ +# define sm_sem_start(key, nsem, semflg, owner) 0 +# define sm_sem_stop(semid) 0 +# define sm_sem_acq(semid, semnum, timeout) 0 +# define sm_sem_rel(semid, semnum, timeout) 0 +# define sm_sem_get(semid, semnum) 0 +# endif /* SM_CONF_SEM > 0 */ + +#endif /* ! SM_SEM_H */ diff --git a/contrib/sendmail/include/sm/shm.h b/contrib/sendmail/include/sm/shm.h index 0334ae340376..61333a20b8a9 100644 --- a/contrib/sendmail/include/sm/shm.h +++ b/contrib/sendmail/include/sm/shm.h @@ -1,12 +1,12 @@ /* - * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2003, 2005 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * $Id: shm.h,v 1.10 2003/05/17 18:34:54 ca Exp $ + * $Id: shm.h,v 1.11 2005/01/13 22:57:04 ca Exp $ */ #ifndef SM_SHM_H @@ -28,6 +28,7 @@ extern void *sm_shmstart __P((key_t, int , int , int *, bool)); extern int sm_shmstop __P((void *, int, bool)); +extern int sm_shmsetowner __P((int, uid_t, gid_t, mode_t)); /* for those braindead systems... (e.g., SunOS 4) */ |