summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/include/sm
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail/include/sm')
-rw-r--r--contrib/sendmail/include/sm/bdb.h2
-rw-r--r--contrib/sendmail/include/sm/cdefs.h2
-rw-r--r--contrib/sendmail/include/sm/conf.h152
-rw-r--r--contrib/sendmail/include/sm/config.h44
-rw-r--r--contrib/sendmail/include/sm/debug.h28
-rw-r--r--contrib/sendmail/include/sm/errstring.h5
-rw-r--r--contrib/sendmail/include/sm/fdset.h2
-rw-r--r--contrib/sendmail/include/sm/gen.h7
-rw-r--r--contrib/sendmail/include/sm/io.h16
-rw-r--r--contrib/sendmail/include/sm/ldap.h40
-rw-r--r--contrib/sendmail/include/sm/os/sm_os_aix.h2
-rw-r--r--contrib/sendmail/include/sm/os/sm_os_unicos.h19
-rw-r--r--contrib/sendmail/include/sm/os/sm_os_unicosmk.h18
-rw-r--r--contrib/sendmail/include/sm/os/sm_os_unicosmp.h22
-rw-r--r--contrib/sendmail/include/sm/os/sm_os_unixware.h2
-rw-r--r--contrib/sendmail/include/sm/rpool.h8
-rw-r--r--contrib/sendmail/include/sm/shm.h2
-rw-r--r--contrib/sendmail/include/sm/string.h88
-rw-r--r--contrib/sendmail/include/sm/varargs.h2
19 files changed, 285 insertions, 176 deletions
diff --git a/contrib/sendmail/include/sm/bdb.h b/contrib/sendmail/include/sm/bdb.h
index 453eaa7..babe1ff 100644
--- a/contrib/sendmail/include/sm/bdb.h
+++ b/contrib/sendmail/include/sm/bdb.h
@@ -7,7 +7,7 @@
* the sendmail distribution.
*
*
- * $Id: bdb.h,v 1.1.2.4 2003/03/06 16:27:38 ca Exp $
+ * $Id: bdb.h,v 1.4 2003/03/06 16:30:05 ca Exp $
*/
#ifndef SM_BDB_H
diff --git a/contrib/sendmail/include/sm/cdefs.h b/contrib/sendmail/include/sm/cdefs.h
index 7b06e79..046ea04 100644
--- a/contrib/sendmail/include/sm/cdefs.h
+++ b/contrib/sendmail/include/sm/cdefs.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: cdefs.h,v 1.15.2.1 2003/12/05 22:44:17 ca Exp $
+ * $Id: cdefs.h,v 1.16 2003/12/05 22:45:25 ca Exp $
*/
/*
diff --git a/contrib/sendmail/include/sm/conf.h b/contrib/sendmail/include/sm/conf.h
index 055b958..355d427 100644
--- a/contrib/sendmail/include/sm/conf.h
+++ b/contrib/sendmail/include/sm/conf.h
@@ -10,7 +10,7 @@
* the sendmail distribution.
*
*
- * $Id: conf.h,v 1.90.2.20 2004/01/07 00:52:16 ca Exp $
+ * $Id: conf.h,v 1.116 2004/07/26 18:08:35 ca Exp $
*/
/*
@@ -436,6 +436,8 @@ typedef int pid_t;
# endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */
# if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209)
# define HASURANDOMDEV 1 /* /dev/[u]random added in S9 */
+# define HASCLOSEFROM 1 /* closefrom(3c) added in S9 */
+# define HASFDWALK 1 /* fdwalk(3c) added in S9 */
# endif /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */
# if SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210)
# define HASUNSETENV 1 /* unsetenv() added in S10 */
@@ -481,7 +483,7 @@ extern char *getenv();
# else /* SUNOS403 */
/* 4.1.x specifics */
-# define HASSETSID 1 /* has Posix setsid(2) call */
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASSETVBUF 1 /* we have setvbuf(3) in libc */
# endif /* SUNOS403 */
@@ -510,7 +512,7 @@ extern char *getenv();
# define LA_TYPE LA_DGUX
# define HASSETREUID 1 /* has setreuid(2) call */
# define HASUNAME 1 /* use System V uname(2) system call */
-# define HASSETSID 1 /* has Posix setsid(2) call */
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# define IP_SRCROUTE 0 /* does not have <netinet/ip_var.h> */
# define HASGETUSERSHELL 0 /* does not have getusershell(3) */
@@ -714,8 +716,7 @@ typedef int pid_t;
# endif /* NeXT */
/*
-** Apple Darwin (aka Rhapsody)
-**
+** Apple Darwin
** Contributed by Wilfredo Sanchez <wsanchez@mit.edu>
*/
@@ -725,7 +726,7 @@ typedef int pid_t;
# define HASFLOCK 1 /* has flock(2) */
# define HASUNAME 1 /* has uname(2) */
# define HASUNSETENV 1 /* has unsetenv(3) */
-# define HASSETSID 1 /* has the setsid(2) */
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASINITGROUPS 1 /* has initgroups(3) */
# define HASSETVBUF 1 /* has setvbuf (3) */
# define HASSETREUID 0 /* setreuid(2) unusable */
@@ -794,7 +795,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
# include <paths.h>
# define HASUNSETENV 1 /* has the unsetenv(3) call */
# define HASSETREUID 0 /* BSD-OS has broken setreuid(2) emulation */
-# define HASSETSID 1 /* has the setsid(2) POSIX syscall */
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define USESETEUID 1 /* has usable seteuid(2) call */
# define HASFCHMOD 1 /* has fchmod(2) syscall */
# define HASSETLOGIN 1 /* has setlogin(2) */
@@ -842,7 +843,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
# include <unix.h>
# include <sys/select.h>
# undef NGROUPS_MAX
-# define HASSETSID 1 /* has the setsid(2) POSIX syscall */
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define USESETEUID 1 /* has usable seteuid(2) call */
# define HASFCHMOD 1 /* has fchmod(2) syscall */
# define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
@@ -876,10 +877,10 @@ extern unsigned int sleepX __P((unsigned int seconds));
# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# include <paths.h>
# define HASUNSETENV 1 /* has unsetenv(3) call */
-# define HASSETSID 1 /* has the setsid(2) POSIX syscall */
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define USESETEUID 1 /* has usable seteuid(2) call */
# define HASFCHMOD 1 /* has fchmod(2) syscall */
-# define HASFCHOWN 1 /* fchown(2) */
+# define HASFCHOWN 1 /* has fchown(2) syscall */
# define HASUNAME 1 /* has uname(2) syscall */
# define HASSTRERROR 1 /* has strerror(3) */
# define HAS_ST_GEN 1 /* has st_gen field in stat struct */
@@ -894,7 +895,12 @@ extern unsigned int sleepX __P((unsigned int seconds));
# ifndef LA_TYPE
# define LA_TYPE LA_SUBR
# endif /* ! LA_TYPE */
-# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
+# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200040000
+# undef SFS_TYPE
+# define SFS_TYPE SFS_STATVFS
+# else
+# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
+# endif
# if defined(__NetBSD__) && (NetBSD > 199307 || NetBSD0_9 > 1)
# undef SPT_TYPE
# define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */
@@ -902,6 +908,17 @@ extern unsigned int sleepX __P((unsigned int seconds));
# if defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3))
# define HASURANDOMDEV 1 /* has /dev/urandom(4) */
# endif /* defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3)) */
+# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104170000
+# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
+# endif
+# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200060000
+# define HASCLOSEFROM 1 /* closefrom(3) added in 2.0F */
+# endif
+# if defined(__NetBSD__)
+# define USESYSCTL 1 /* use sysctl(3) for getting ncpus */
+# include <sys/param.h>
+# include <sys/sysctl.h>
+# endif
# if defined(__FreeBSD__)
# define HASSETLOGIN 1 /* has setlogin(2) */
# if __FreeBSD_version >= 227001
@@ -949,6 +966,9 @@ extern unsigned int sleepX __P((unsigned int seconds));
# if OpenBSD >= 200012
# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
# endif /* OpenBSD >= 200012 */
+# if OpenBSD >= 200405
+# define HASCLOSEFROM 1 /* closefrom(3) added in 3.5 */
+# endif /* OpenBSD >= 200405 */
# endif /* defined(__OpenBSD__) */
# endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
@@ -1365,7 +1385,11 @@ extern void *malloc();
# if LINUX_VERSION_CODE < 66399
# define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */
# else /* LINUX_VERSION_CODE < 66399 */
-# define HASFLOCK 1 /* flock(2) fixed after 1.3.95 */
+# if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
+# define HASFLOCK 1 /* flock(2) fixed after 1.3.95 */
+# else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) */
+# define HASFLOCK 0 /* flock(2) is broken (again) after 2.4.0 */
+# endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) */
# endif /* LINUX_VERSION_CODE < 66399 */
# endif /* ! HASFLOCK */
# ifndef LA_TYPE
@@ -1379,9 +1403,7 @@ extern void *malloc();
# endif /* ! HASURANDOMDEV */
# endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0)) */
# if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-# ifndef HASSTRERROR
-# define HASSTRERROR 1 /* has strerror(3) */
-# endif /* HASSTRERROR */
+# define HASSTRERROR 1 /* has strerror(3) */
# endif /* defined(__GLIBC__) && defined(__GLIBC_MINOR__) */
# ifndef TZ_TYPE
# define TZ_TYPE TZ_NONE /* no standard for Linux */
@@ -1600,22 +1622,66 @@ typedef int pid_t;
# endif /* ! _PATH_SENDMAILPID */
# endif /* _SEQUENT_ */
-
/*
-** Cray Unicos
+** Cray UNICOS, UNICOS/mk, and UNICOS/mp
**
+** UNICOS:
** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
+** Update Brian Ginsbach <ginsbach@cray.com>
+** UNICOS/mk (Cray T3E):
+** Contributed by Manu Mahonen <mailadm@csc.fi>
+** of Center for Scientific Computing.
+** Update Brian Ginsbach <ginsbach@cray.com>
+** UNICOS/mp:
+** From Aaron Davis <awd@cray.com> & Brian Ginsbach <ginsbach@cray.com>
*/
-# ifdef UNICOS
+# if defined(_CRAY) || defined(UNICOS) || defined(_UNICOSMP)
# define SYSTEM5 1 /* include all the System V defines */
-# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
-# define MAXPATHLEN PATHSIZE
-# define LA_TYPE LA_ZERO
+# define HASFCHMOD 1 /* has fchmod(2) syscall */
+# define HASFCHOWN 1 /* has fchown(2) */
+# define HASUNSETENV 1 /* has unsetenv(3) call */
+# define HASINITGROUPS 1 /* has initgroups(3) call */
+# define HASSETREUID 1 /* has setreuid(2) call */
+# define USESETEUID 1 /* has usable seteuid(2) call */
+# define HASGETDTABLESIZE 1 /* has getdtablesize(2) syscall */
+# define HASSTRERROR 1 /* has strerror(3) */
+# define GIDSET_T gid_t
# define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
-# define SFS_BAVAIL f_bfree /* alternate field name */
-# endif /* UNICOS */
-
+# define SFS_BAVAIL f_bfree /* alternate field name */
+# define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */
+# ifdef UNICOS
+# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
+# define LA_TYPE LA_ZERO
+# define _PATH_MAILDIR "/usr/spool/mail"
+# define GET_IPOPT_DST(dst) *(struct in_addr *)&(dst)
+# ifndef MAXPATHLEN
+# define MAXPATHLEN PATHSIZE
+# endif /* ! MAXPATHLEN */
+# ifndef _PATH_UNIX
+# ifdef UNICOSMK
+# define _PATH_UNIX "/unicosmk.ar"
+# else
+# define _PATH_UNIX "/unicos"
+# endif /* UNICOSMK */
+# endif /* ! _PATH_UNIX */
+# ifndef _PATH_VENDOR_CF
+# define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
+# endif /* ! _PATH_VENDOR_CF */
+# endif /* UNICOS */
+# ifdef _UNICOSMP
+# if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN)
+ /* _SC_NPROC_ONLN is 'mpadmin -u', total # of unrestricted processors */
+# define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN
+# endif /* if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN) */
+# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
+# define HASSETRLIMIT 1 /* has setrlimit(2) syscall */
+# define LA_TYPE LA_IRIX6 /* figure out at run time */
+# include <sys/cdefs.h>
+# include <paths.h>
+# define ARGV_T char *const *
+# endif /* _UNICOSMP */
+# endif /* _CRAY */
/*
** Apollo DomainOS
@@ -1731,7 +1797,7 @@ extern struct passwd * sendmail_mpe_getpwuid __P((uid_t));
# define __svr4__
# define SYS5SIGNALS 1
# define HASFCHOWN 1 /* has fchown(2) call */
-# define HASSETSID 1
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASSETREUID 1
# define HASWAITPID 1
# define HASGETDTABLESIZE 1
@@ -1781,7 +1847,7 @@ extern struct passwd * sendmail_mpe_getpwuid __P((uid_t));
# define SYSTEM5 1
# define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
# define HASSETREUID 1
-# define HASSETSID 1
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASINITGROUPS 1
# define GIDSET_T gid_t
# define SLEEP_T unsigned
@@ -2003,7 +2069,7 @@ typedef int (*sigfunc_t)();
# ifndef __svr4__
# define __svr4__ /* use all System V Release 4 defines below */
# endif /* ! __svr4__ */
-# define HASSETSID 1 /* has Posix setsid(2) call */
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */
# define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */
# ifndef SPT_TYPE
@@ -2082,7 +2148,7 @@ extern char *getenv();
# define __svr4__ /* use all System V Release 4 defines below */
# endif /* ! __svr4__ */
# define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
-# define HASSETSID 1 /* has Posix setsid(2) call */
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */
# define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */
# define GIDSET_T gid_t
@@ -2204,19 +2270,6 @@ typedef struct msgb mblk_t;
# define SM_INT32 int /* 32bit integer */
# endif /* sinix */
-/*
-** CRAY T3E
-**
-** Contributed by Manu Mahonen <mailadm@csc.fi>
-** of Center for Scientific Computing.
-*/
-# ifdef _CRAY
-# define GET_IPOPT_DST(dst) *(struct in_addr *)&(dst)
-# define _PATH_MAILDIR "/usr/spool/mail"
-# if !defined(MAXPATHLEN)
-# define MAXPATHLEN PATHSIZE
-# endif /* !defined(MAXPATHLEN) */
-# endif /* _CRAY */
/*
** Motorola 922, MC88110, UNIX SYSTEM V/88 Release 4.0 Version 4.3
@@ -2227,7 +2280,7 @@ typedef struct msgb mblk_t;
# ifdef MOTO
# define HASFCHMOD 1
# define HASSETRLIMIT 0
-# define HASSETSID 1
+# define HASSETSID 1 /* has POSIX setsid(2) call */
# define HASSETREUID 1
# define HASULIMIT 1
# define HASWAITPID 1
@@ -2257,8 +2310,13 @@ typedef struct msgb mblk_t;
# undef HAVE_SYS_ERRLIST
# define sys_errlist __sys_errlist
# define sys_nerr __sys_nerr
-# define major(dev) ((int)(((dev) >> 8) & 0xff))
-# define minor(dev) ((int)((dev) & 0xff))
+# include <sys/mkdev.h>
+# ifndef major
+# define major(dev) ((int)(((dev) >> 8) & 0xff))
+# endif /* ! major */
+# ifndef minor
+# define minor(dev) ((int)((dev) & 0xff))
+# endif /* ! minor */
# endif /* defined(__INTERIX) */
@@ -2359,8 +2417,8 @@ typedef struct msgb mblk_t;
/* general POSIX defines */
# ifdef _POSIX_VERSION
-# define HASSETSID 1 /* has Posix setsid(2) call */
-# define HASWAITPID 1 /* has Posix waitpid(2) call */
+# define HASSETSID 1 /* has POSIX setsid(2) call */
+# define HASWAITPID 1 /* has POSIX waitpid(2) call */
# if _POSIX_VERSION >= 199500 && !defined(USESETEUID)
# define USESETEUID 1 /* has usable seteuid(2) call */
# endif /* _POSIX_VERSION >= 199500 && !defined(USESETEUID) */
@@ -2578,7 +2636,7 @@ typedef struct msgb mblk_t;
#endif /* ! EX_NOTFOUND */
/* pseudo-code used for mci_setstat */
-# define EX_NOTSTICKY -5 /* don't save persistent status */
+# define EX_NOTSTICKY (-5) /* don't save persistent status */
/*
diff --git a/contrib/sendmail/include/sm/config.h b/contrib/sendmail/include/sm/config.h
index 791a525..3e4a912 100644
--- a/contrib/sendmail/include/sm/config.h
+++ b/contrib/sendmail/include/sm/config.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2003 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: config.h,v 1.44 2002/01/23 17:47:15 gshapiro Exp $
+ * $Id: config.h,v 1.46 2003/12/10 03:19:06 gshapiro Exp $
*/
/*
@@ -143,8 +143,12 @@
# define SM_CONF_TEST_LLONG 1
# endif /* !SM_CONF_TEST_LLONG */
-/* Does LDAP library have ldap_memfree()? */
-# ifndef SM_CONF_LDAP_MEMFREE
+/* LDAP Checks */
+# if LDAPMAP
+# include <ldap.h>
+
+/* Does the LDAP library have ldap_memfree()? */
+# ifndef SM_CONF_LDAP_MEMFREE
/*
** The new LDAP C API (draft-ietf-ldapext-ldap-c-api-04.txt) includes
@@ -152,11 +156,31 @@
** of 2004 to identify the API.
*/
-# if USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004
-# define SM_CONF_LDAP_MEMFREE 1
-# else /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
-# define SM_CONF_LDAP_MEMFREE 0
-# endif /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
-# endif /* ! SM_CONF_LDAP_MEMFREE */
+# if USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004
+# define SM_CONF_LDAP_MEMFREE 1
+# else /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
+# define SM_CONF_LDAP_MEMFREE 0
+# endif /* USING_NETSCAPE_LDAP || LDAP_API_VERSION >= 2004 */
+# endif /* ! SM_CONF_LDAP_MEMFREE */
+
+/* Does the LDAP library have ldap_initialize()? */
+# ifndef SM_CONF_LDAP_INITIALIZE
+
+/*
+** Check for ldap_initialize() support for support for LDAP URI's with
+** non-ldap:// schemes.
+*/
+
+/* OpenLDAP does it with LDAP_OPT_URI */
+# ifdef LDAP_OPT_URI
+# define SM_CONF_LDAP_INITIALIZE 1
+# endif /* LDAP_OPT_URI */
+# endif /* !SM_CONF_LDAP_INITIALIZE */
+# endif /* LDAPMAP */
+
+/* don't use strcpy() */
+# ifndef DO_NOT_USE_STRCPY
+# define DO_NOT_USE_STRCPY 1
+# endif /* ! DO_NOT_USE_STRCPY */
#endif /* ! SM_CONFIG_H */
diff --git a/contrib/sendmail/include/sm/debug.h b/contrib/sendmail/include/sm/debug.h
index eba29ad..e3142b2 100644
--- a/contrib/sendmail/include/sm/debug.h
+++ b/contrib/sendmail/include/sm/debug.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000, 2001, 2003 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: debug.h,v 1.15 2001/03/08 03:23:07 ca Exp $
+ * $Id: debug.h,v 1.16 2003/01/10 00:26:06 ca Exp $
*/
/*
@@ -28,29 +28,26 @@ extern SM_FILE_T *
sm_debug_file __P((void));
extern void
-sm_debug_setfile __P((
- SM_FILE_T *));
+sm_debug_setfile __P(( SM_FILE_T *));
extern void PRINTFLIKE(1, 2)
-sm_dprintf __P((
- char *_fmt,
- ...));
+sm_dprintf __P((char *_fmt, ...));
extern void
sm_dflush __P((void));
+extern void
+sm_debug_close __P((void));
+
/*
** abstractions for setting and testing debug activation levels
*/
extern void
-sm_debug_addsettings_x __P((
- const char *));
+sm_debug_addsettings_x __P((const char *));
extern void
-sm_debug_addsetting_x __P((
- const char *,
- int));
+sm_debug_addsetting_x __P((const char *, int));
# define SM_DEBUG_UNKNOWN ((SM_ATOMIC_UINT_T)(-1))
@@ -123,13 +120,10 @@ struct sm_debug
# endif /* SM_DEBUG_CHECK */
extern bool
-sm_debug_loadactive __P((
- SM_DEBUG_T *,
- int));
+sm_debug_loadactive __P((SM_DEBUG_T *, int));
extern int
-sm_debug_loadlevel __P((
- SM_DEBUG_T *));
+sm_debug_loadlevel __P((SM_DEBUG_T *));
# define SM_DEBUG_INITIALIZER(name, desc) { \
SmDebugMagic, \
diff --git a/contrib/sendmail/include/sm/errstring.h b/contrib/sendmail/include/sm/errstring.h
index cc69c51..2b93732 100644
--- a/contrib/sendmail/include/sm/errstring.h
+++ b/contrib/sendmail/include/sm/errstring.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: errstring.h,v 1.4.4.3 2003/06/24 17:16:10 ca Exp $
+ * $Id: errstring.h,v 1.9 2003/12/10 03:19:06 gshapiro Exp $
*/
/*
@@ -17,7 +17,9 @@
# define SM_ERRSTRING_H
#include <errno.h>
+#if NEEDINTERRNO
extern int errno;
+#endif /* NEEDINTERRNO */
/*
** These are used in a few cases where we need some special
@@ -44,6 +46,7 @@ extern int errno;
#define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */
#define E_SMDBBASE (E_PSEUDOBASE + 40) /* base for libsmdb errors */
#define E_LDAPBASE (E_PSEUDOBASE + 70) /* base for LDAP errors */
+#define E_LDAPURLBASE (E_PSEUDOBASE + 200) /* base for LDAP URL errors */
/* libsmdb */
diff --git a/contrib/sendmail/include/sm/fdset.h b/contrib/sendmail/include/sm/fdset.h
index 31a0e30..bb42185 100644
--- a/contrib/sendmail/include/sm/fdset.h
+++ b/contrib/sendmail/include/sm/fdset.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: fdset.h,v 1.3.10.2 2002/12/10 04:02:25 ca Exp $
+ * $Id: fdset.h,v 1.5 2002/12/10 19:48:19 ca Exp $
*/
#ifndef SM_FDSET_H
diff --git a/contrib/sendmail/include/sm/gen.h b/contrib/sendmail/include/sm/gen.h
index 61b6e1b..6fec06c 100644
--- a/contrib/sendmail/include/sm/gen.h
+++ b/contrib/sendmail/include/sm/gen.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: gen.h,v 1.22 2002/04/03 00:40:42 ca Exp $
+ * $Id: gen.h,v 1.23 2003/11/04 18:51:54 ca Exp $
*/
/*
@@ -43,7 +43,7 @@
# else /* SM_CONF_STDDEF_H */
# ifndef NULL
# define NULL 0
-# endif
+# endif /* ! NULL */
# define offsetof(type, member) ((size_t)(&((type *)0)->member))
# endif /* SM_CONF_STDDEF_H */
@@ -58,7 +58,8 @@
typedef int bool;
# define false 0
# define true 1
-# endif
+# define __bool_true_false_are_defined 1
+# endif /* ! __cplusplus */
# endif /* SM_CONF_STDBOOL_H */
/*
diff --git a/contrib/sendmail/include/sm/io.h b/contrib/sendmail/include/sm/io.h
index 0e50c23..d3f21d0 100644
--- a/contrib/sendmail/include/sm/io.h
+++ b/contrib/sendmail/include/sm/io.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990
* The Regents of the University of California. All rights reserved.
@@ -11,7 +11,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: io.h,v 1.23.2.2 2003/09/05 20:35:28 ca Exp $
+ * $Id: io.h,v 1.24 2004/03/03 19:14:49 ca Exp $
*/
/*-
@@ -34,15 +34,15 @@
#define SM_IO_RDWRTR 6 /* read-write with truncation indicated */
# define SM_IO_BINARY 0x0 /* binary mode: not used in Unix */
-#define SM_IS_BINARY(mode) ((mode) & SM_IO_BINARY != 0)
+#define SM_IS_BINARY(mode) (((mode) & SM_IO_BINARY) != 0)
#define SM_IO_MODE(mode) ((mode) & 0x0f)
-#define SM_IO_RDWR_B (SM_IO_RDWR|SM_IO_BINARY)
-#define SM_IO_RDONLY_B (SM_IO_RDONLY|SM_IO_BINARY)
-#define SM_IO_WRONLY_B (SM_IO_WRONLY|SM_IO_BINARY)
-#define SM_IO_APPEND_B (SM_IO_APPEND|SM_IO_BINARY)
+#define SM_IO_RDWR_B (SM_IO_RDWR|SM_IO_BINARY)
+#define SM_IO_RDONLY_B (SM_IO_RDONLY|SM_IO_BINARY)
+#define SM_IO_WRONLY_B (SM_IO_WRONLY|SM_IO_BINARY)
+#define SM_IO_APPEND_B (SM_IO_APPEND|SM_IO_BINARY)
#define SM_IO_APPENDRW_B (SM_IO_APPENDRW|SM_IO_BINARY)
-#define SM_IO_RDWRTR_B (SM_IO_RDWRTR|SM_IO_BINARY)
+#define SM_IO_RDWRTR_B (SM_IO_RDWRTR|SM_IO_BINARY)
/* for sm_io_fseek, et al api's (exposed) */
#define SM_IO_SEEK_SET 0
diff --git a/contrib/sendmail/include/sm/ldap.h b/contrib/sendmail/include/sm/ldap.h
index dfa0463..8df8fe1 100644
--- a/contrib/sendmail/include/sm/ldap.h
+++ b/contrib/sendmail/include/sm/ldap.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: ldap.h,v 1.22 2002/03/05 02:17:26 ca Exp $
+ * $Id: ldap.h,v 1.27 2003/12/20 09:23:47 gshapiro Exp $
*/
#ifndef SM_LDAP_H
@@ -32,34 +32,26 @@
# if LDAPMAP
-# if _FFR_LDAP_RECURSION
-
/* Attribute types */
-# define SM_LDAP_ATTR_NONE (-1)
-# define SM_LDAP_ATTR_OBJCLASS 0
-# define SM_LDAP_ATTR_NORMAL 1
-# define SM_LDAP_ATTR_DN 2
-# define SM_LDAP_ATTR_FILTER 3
-# define SM_LDAP_ATTR_URL 4
+# define SM_LDAP_ATTR_NONE (-1)
+# define SM_LDAP_ATTR_OBJCLASS 0
+# define SM_LDAP_ATTR_NORMAL 1
+# define SM_LDAP_ATTR_DN 2
+# define SM_LDAP_ATTR_FILTER 3
+# define SM_LDAP_ATTR_URL 4
/* sm_ldap_results() flags */
-# define SM_LDAP_SINGLEMATCH 0x0001
-# define SM_LDAP_MATCHONLY 0x0002
-# define SM_LDAP_USE_ALLATTR 0x0004
-
-# endif /* _FFR_LDAP_RECURSION */
+# define SM_LDAP_SINGLEMATCH 0x0001
+# define SM_LDAP_MATCHONLY 0x0002
+# define SM_LDAP_USE_ALLATTR 0x0004
struct sm_ldap_struct
{
/* needed for ldap_open or ldap_init */
- char *ldap_target;
+ char *ldap_uri;
+ char *ldap_host;
int ldap_port;
-# if _FFR_LDAP_URI
- bool ldap_uri;
-# endif /* _FFR_LDAP_URI */
-# if _FFR_LDAP_SETVERSION
int ldap_version;
-# endif /* _FFR_LDAP_SETVERSION */
pid_t ldap_pid;
/* options set in ld struct before ldap_bind_s */
@@ -79,10 +71,8 @@ struct sm_ldap_struct
int ldap_scope;
char *ldap_filter;
char *ldap_attr[LDAPMAP_MAX_ATTR + 1];
-# if _FFR_LDAP_RECURSION
int ldap_attr_type[LDAPMAP_MAX_ATTR + 1];
char *ldap_attr_needobjclass[LDAPMAP_MAX_ATTR + 1];
-# endif /* _FFR_LDAP_RECURSION */
bool ldap_attrsonly;
/* args for ldap_result */
@@ -98,11 +88,12 @@ struct sm_ldap_struct
typedef struct sm_ldap_struct SM_LDAP_STRUCT;
-# if _FFR_LDAP_RECURSION
struct sm_ldap_recurse_entry
{
char *lr_search;
int lr_type;
+ LDAPURLDesc *lr_ludp;
+ char **lr_attrs;
bool lr_done;
};
@@ -115,17 +106,14 @@ struct sm_ldap_recurse_list
typedef struct sm_ldap_recurse_entry SM_LDAP_RECURSE_ENTRY;
typedef struct sm_ldap_recurse_list SM_LDAP_RECURSE_LIST;
-# endif /* _FFR_LDAP_RECURSION */
/* functions */
extern void sm_ldap_clear __P((SM_LDAP_STRUCT *));
extern bool sm_ldap_start __P((char *, SM_LDAP_STRUCT *));
extern int sm_ldap_search __P((SM_LDAP_STRUCT *, char *));
-# if _FFR_LDAP_RECURSION
extern int sm_ldap_results __P((SM_LDAP_STRUCT *, int, int, int,
SM_RPOOL_T *, char **, int *, int *,
SM_LDAP_RECURSE_LIST *));
-# endif /* _FFR_LDAP_RECURSION */
extern void sm_ldap_setopts __P((LDAP *, SM_LDAP_STRUCT *));
extern int sm_ldap_geterrno __P((LDAP *));
extern void sm_ldap_close __P((SM_LDAP_STRUCT *));
diff --git a/contrib/sendmail/include/sm/os/sm_os_aix.h b/contrib/sendmail/include/sm/os/sm_os_aix.h
index 9c3f469..4669a3c 100644
--- a/contrib/sendmail/include/sm/os/sm_os_aix.h
+++ b/contrib/sendmail/include/sm/os/sm_os_aix.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: sm_os_aix.h,v 1.9.2.1 2003/04/28 23:11:07 ca Exp $
+ * $Id: sm_os_aix.h,v 1.11 2003/04/28 23:42:23 ca Exp $
*/
/*
diff --git a/contrib/sendmail/include/sm/os/sm_os_unicos.h b/contrib/sendmail/include/sm/os/sm_os_unicos.h
new file mode 100644
index 0000000..57d6b72
--- /dev/null
+++ b/contrib/sendmail/include/sm/os/sm_os_unicos.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2003 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: sm_os_unicos.h,v 1.1 2003/04/21 17:03:51 ca Exp $
+ */
+
+/*
+** Cray UNICOS
+*/
+
+#define SM_OS_NAME "unicos"
+
+#define SM_CONF_LONGLONG 1
+#define SM_CONF_SETITIMER 0
diff --git a/contrib/sendmail/include/sm/os/sm_os_unicosmk.h b/contrib/sendmail/include/sm/os/sm_os_unicosmk.h
new file mode 100644
index 0000000..ce87c04
--- /dev/null
+++ b/contrib/sendmail/include/sm/os/sm_os_unicosmk.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2003 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: sm_os_unicosmk.h,v 1.1 2003/04/21 17:03:51 ca Exp $
+ */
+
+/*
+** Cray UNICOS/mk
+*/
+
+#define SM_OS_NAME "unicosmk"
+
+#define SM_CONF_LONGLONG 1
diff --git a/contrib/sendmail/include/sm/os/sm_os_unicosmp.h b/contrib/sendmail/include/sm/os/sm_os_unicosmp.h
new file mode 100644
index 0000000..b11350b
--- /dev/null
+++ b/contrib/sendmail/include/sm/os/sm_os_unicosmp.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2003 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: sm_os_unicosmp.h,v 1.1 2003/04/21 17:03:51 ca Exp $
+ */
+
+/*
+** Cray UNICOS/mp
+*/
+
+#define SM_OS_NAME "unicosmp"
+
+#define SM_CONF_LONGLONG 1
+#define SM_CONF_SYS_CDEFS_H 1
+#define SM_CONF_MSG 1
+#define SM_CONF_SHM 1
+#define SM_CONF_SEM 1
diff --git a/contrib/sendmail/include/sm/os/sm_os_unixware.h b/contrib/sendmail/include/sm/os/sm_os_unixware.h
index aac431e..6c7bfe6 100644
--- a/contrib/sendmail/include/sm/os/sm_os_unixware.h
+++ b/contrib/sendmail/include/sm/os/sm_os_unixware.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: sm_os_unixware.h,v 1.7.2.1 2002/10/24 18:02:14 ca Exp $
+ * $Id: sm_os_unixware.h,v 1.8 2002/10/24 18:04:54 ca Exp $
*/
#define SM_OS_NAME "unixware"
diff --git a/contrib/sendmail/include/sm/rpool.h b/contrib/sendmail/include/sm/rpool.h
index e750fcb..cdff4c7 100644
--- a/contrib/sendmail/include/sm/rpool.h
+++ b/contrib/sendmail/include/sm/rpool.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003 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: rpool.h,v 1.15 2001/09/04 22:41:55 ca Exp $
+ * $Id: rpool.h,v 1.16 2003/09/05 23:07:49 ca Exp $
*/
/*
@@ -165,8 +165,12 @@ sm_rpool_malloc __P((
size_t _size));
# endif /* SM_HEAP_CHECK */
+#if DO_NOT_USE_STRCPY
+extern char *sm_rpool_strdup_x __P((SM_RPOOL_T *rpool, const char *s));
+#else /* DO_NOT_USE_STRCPY */
# define sm_rpool_strdup_x(rpool, str) \
strcpy(sm_rpool_malloc_x(rpool, strlen(str) + 1), str)
+#endif /* DO_NOT_USE_STRCPY */
extern SM_RPOOL_ATTACH_T
sm_rpool_attach_x __P((
diff --git a/contrib/sendmail/include/sm/shm.h b/contrib/sendmail/include/sm/shm.h
index 36033ed..0334ae3 100644
--- a/contrib/sendmail/include/sm/shm.h
+++ b/contrib/sendmail/include/sm/shm.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: shm.h,v 1.8.2.2 2003/05/17 18:34:16 ca Exp $
+ * $Id: shm.h,v 1.10 2003/05/17 18:34:54 ca Exp $
*/
#ifndef SM_SHM_H
diff --git a/contrib/sendmail/include/sm/string.h b/contrib/sendmail/include/sm/string.h
index c8cb59f..7c96b8f 100644
--- a/contrib/sendmail/include/sm/string.h
+++ b/contrib/sendmail/include/sm/string.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2003 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: string.h,v 1.36 2001/06/17 21:31:11 ca Exp $
+ * $Id: string.h,v 1.38 2003/10/10 17:56:57 ca Exp $
*/
/*
@@ -24,25 +24,30 @@
#define SPACELEFT(buf, ptr) (sizeof buf - ((ptr) - buf))
extern int PRINTFLIKE(3, 4)
-sm_snprintf __P((
- char *,
- size_t,
- const char *,
- ...));
+sm_snprintf __P((char *, size_t, const char *, ...));
extern bool
-sm_match __P((
- const char *_str,
- const char *_pattern));
+sm_match __P((const char *_str, const char *_pattern));
extern char *
-sm_strdup __P((
- char *));
+sm_strdup __P((char *));
extern char *
-sm_strndup_x __P((
- const char *_str,
- size_t _len));
+sm_strndup_x __P((const char *_str, size_t _len));
+
+#if DO_NOT_USE_STRCPY
+/* for "normal" data (free'd before end of process) */
+extern char *
+sm_strdup_x __P((const char *_str));
+
+/* for data that is supposed to be persistent. */
+extern char *
+sm_pstrdup_x __P((const char *_str));
+
+extern char *
+sm_strdup_tagged_x __P((const char *str, char *file, int line, int group));
+
+#else /* DO_NOT_USE_STRCPY */
/* for "normal" data (free'd before end of process) */
# define sm_strdup_x(str) strcpy(sm_malloc_x(strlen(str) + 1), str)
@@ -52,35 +57,22 @@ sm_strndup_x __P((
# define sm_strdup_tagged_x(str, file, line, group) \
strcpy(sm_malloc_tagged_x(strlen(str) + 1, file, line, group), str)
+#endif /* DO_NOT_USE_STRCPY */
extern char *
-sm_stringf_x __P((
- const char *_fmt,
- ...));
+sm_stringf_x __P((const char *_fmt, ...));
extern char *
-sm_vstringf_x __P((
- const char *_fmt,
- va_list _ap));
+sm_vstringf_x __P((const char *_fmt, va_list _ap));
extern size_t
-sm_strlcpy __P((
- char *_dst,
- const char *_src,
- ssize_t _len));
+sm_strlcpy __P((char *_dst, const char *_src, ssize_t _len));
extern size_t
-sm_strlcat __P((
- char *_dst,
- const char *_src,
- ssize_t _len));
+sm_strlcat __P((char *_dst, const char *_src, ssize_t _len));
extern size_t
-sm_strlcat2 __P((
- char *,
- const char *,
- const char *,
- ssize_t));
+sm_strlcat2 __P((char *, const char *, const char *, ssize_t));
extern size_t
#ifdef __STDC__
@@ -94,40 +86,26 @@ sm_strlcpyn __P((char *,
# if !HASSTRERROR
extern char *
-strerror __P((
- int _errno));
+strerror __P((int _errno));
# endif /* !HASSTRERROR */
extern int
-sm_strrevcmp __P((
- const char *,
- const char *));
+sm_strrevcmp __P((const char *, const char *));
extern int
-sm_strrevcasecmp __P((
- const char *,
- const char *));
+sm_strrevcasecmp __P((const char *, const char *));
extern int
-sm_strcasecmp __P((
- const char *,
- const char *));
+sm_strcasecmp __P((const char *, const char *));
extern int
-sm_strncasecmp __P((
- const char *,
- const char *,
- size_t));
+sm_strncasecmp __P((const char *, const char *, size_t));
extern LONGLONG_T
-sm_strtoll __P((
- const char *,
- char**, int));
+sm_strtoll __P((const char *, char**, int));
extern ULONGLONG_T
-sm_strtoull __P((
- const char *,
- char**, int));
+sm_strtoull __P((const char *, char**, int));
extern void
stripquotes __P((char *));
diff --git a/contrib/sendmail/include/sm/varargs.h b/contrib/sendmail/include/sm/varargs.h
index 34f7512..7746e3a 100644
--- a/contrib/sendmail/include/sm/varargs.h
+++ b/contrib/sendmail/include/sm/varargs.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Id: varargs.h,v 1.7.2.1 2002/07/29 21:43:20 gshapiro Exp $
+ * $Id: varargs.h,v 1.8 2002/07/29 21:31:00 gshapiro Exp $
*/
/*
OpenPOWER on IntegriCloud