portability changes
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 20 Jul 1992 23:03:18 +0000 (15:03 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 20 Jul 1992 23:03:18 +0000 (15:03 -0800)
SCCS-vsn: usr.sbin/sendmail/src/main.c 5.55
SCCS-vsn: usr.sbin/sendmail/src/conf.h 5.26
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.112
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 5.37
SCCS-vsn: usr.sbin/sendmail/src/Makefile 5.26
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 5.45
SCCS-vsn: usr.sbin/sendmail/src/conf.c 5.41

usr/src/usr.sbin/sendmail/src/Makefile
usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/conf.h
usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/readcf.c
usr/src/usr.sbin/sendmail/src/sendmail.h
usr/src/usr.sbin/sendmail/src/version.c

index 2df4732..c6f1f8a 100644 (file)
@@ -1,8 +1,17 @@
-#      @(#)Makefile    5.25 (Berkeley) %G%
+#      @(#)Makefile    5.26 (Berkeley) %G%
 
 PROG=  sendmail
 
 
 PROG=  sendmail
 
-CFLAGS+=-I${.CURDIR}
+# define the database format to use for aliases et al.  Can be -DNEWDB (for
+# the new BSD database package -- this is preferred), -DNDBM for the 4.3BSD
+# database package, or -DDBM for the old putrescent V7 package.  You can
+# define both NEWDB and one of the other two during a transition period; old
+# databases are read, but the new format will be used on any rebuilds.  On
+# really gnarly systems, you can set this to null; it will crawl like a high
+# spiral snail, but it will work.
+DBMDEF=        -DNEWDB
+
+CFLAGS+=-I${.CURDIR} ${DBMDEF}
 
 SRCS=  alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
        deliver.c domain.c envelope.c err.c headers.c macro.c main.c mci.c \
 
 SRCS=  alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
        deliver.c domain.c envelope.c err.c headers.c macro.c main.c mci.c \
index b379023..2a66634 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     5.40 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     5.41 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <sys/ioctl.h>
 #endif /* not lint */
 
 # include <sys/ioctl.h>
@@ -715,3 +715,44 @@ reapchild()
                continue;
 # endif WNOHANG
 }
                continue;
 # endif WNOHANG
 }
+\f/*
+**  UNSETENV -- remove a variable from the environment
+**
+**     Not needed on newer systems.
+**
+**     Parameters:
+**             name -- the string name of the environment variable to be
+**                     deleted from the current environment.
+**
+**     Returns:
+**             none.
+**
+**     Globals:
+**             environ -- a pointer to the current environment.
+**
+**     Side Effects:
+**             Modifies environ.
+*/
+
+#ifdef UNSETENV
+
+void
+unsetenv(name)
+       char *name;
+{
+       extern char **environ;
+       register char **pp;
+       int len = strlen(name);
+
+       for (pp = environ; *pp != NULL; pp++)
+       {
+               if (strncmp(name, *pp, len) == 0 &&
+                   ((*pp)[len] == '=' || (*pp)[len] == '\0'))
+                       break;
+       }
+
+       for (; *pp != NULL; pp++)
+               *pp = pp[1];
+}
+
+#endif /* UNSETENV */
index a370fb5..c29f2e8 100644 (file)
@@ -5,7 +5,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)conf.h      5.25 (Berkeley) %G%
+ *     @(#)conf.h      5.26 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -45,9 +45,6 @@
 # define SYSTEM5       1
 # endif
 
 # define SYSTEM5       1
 # endif
 
-/* # define DBM                1       /* use DBM library (requires -ldbm) */
-/* # define NDBM       1       /* new DBM library available (requires DBM) */
-# define NEWDB         1       /* use new 4.4bsd database package db(3) */
 # define LOG           1       /* enable logging */
 # define SMTP          1       /* enable user and server SMTP */
 # define QUEUE         1       /* enable queueing */
 # define LOG           1       /* enable logging */
 # define SMTP          1       /* enable user and server SMTP */
 # define QUEUE         1       /* enable queueing */
 # define MATCHGECOS    1       /* match user names from gecos field */
 
 # ifdef SYSTEM5
 # define MATCHGECOS    1       /* match user names from gecos field */
 
 # ifdef SYSTEM5
+
 # define LOCKF         1       /* use System V lockf instead of flock */
 # define LOCKF         1       /* use System V lockf instead of flock */
+# define SYS5TZ                1       /* use System V style timezones */
+
+# define index         strchr
+# define rindex                strrchr
+
 # endif
 
 /*
 # endif
 
 /*
index 33a840b..1d86c06 100644 (file)
@@ -13,7 +13,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.54 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.55 (Berkeley) %G%";
 #endif /* not lint */
 
 #define        _DEFINE
 #endif /* not lint */
 
 #define        _DEFINE
@@ -149,7 +149,7 @@ main(argc, argv, envp)
        extern ADDRESS *recipient();
        bool canrename;
 
        extern ADDRESS *recipient();
        bool canrename;
 
-#ifndef SYSTEM5
+#ifndef SYS5TZ
        /* enforce use of kernel-supplied time zone information */
        unsetenv("TZ");
 #endif
        /* enforce use of kernel-supplied time zone information */
        unsetenv("TZ");
 #endif
@@ -502,7 +502,7 @@ main(argc, argv, envp)
        if (OpMode == MD_FREEZE || readconfig)
                readcf(ConfFile, safecf, CurEnv);
 
        if (OpMode == MD_FREEZE || readconfig)
                readcf(ConfFile, safecf, CurEnv);
 
-#ifdef SYSTEM5
+#ifdef SYS5TZ
        /* Enforce use of local time (null string overrides this) */
        if (TimeZoneSpec == NULL)
                unsetenv("TZ");
        /* Enforce use of local time (null string overrides this) */
        if (TimeZoneSpec == NULL)
                unsetenv("TZ");
index cb144d6..9c6548c 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)readcf.c   5.44 (Berkeley) %G%";
+static char sccsid[] = "@(#)readcf.c   5.45 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -574,7 +574,7 @@ makemailer(line)
        {
                if (m->m_linelimit == 0)
                        m->m_linelimit = SMTPLINELIM;
        {
                if (m->m_linelimit == 0)
                        m->m_linelimit = SMTPLINELIM;
-               if (!bitnset(M_8BITS, m->m_flags))
+               if (ConfigLevel < 2)
                        setbitn(M_7BITS, m->m_flags);
        }
 
                        setbitn(M_7BITS, m->m_flags);
        }
 
index 24981ac..64cf2ff 100644 (file)
@@ -5,7 +5,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)sendmail.h  5.36 (Berkeley) %G%
+ *     @(#)sendmail.h  5.37 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -15,7 +15,7 @@
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
-static char SmailSccsId[] =    "@(#)sendmail.h 5.36            %G%";
+static char SmailSccsId[] =    "@(#)sendmail.h 5.37            %G%";
 # endif lint
 # else  _DEFINE
 # define EXTERN extern
 # endif lint
 # else  _DEFINE
 # define EXTERN extern
@@ -164,7 +164,6 @@ typedef struct mailer       MAILER;
 # define M_UGLYUUCP    'U'     /* this wants an ugly UUCP from line */
 # define M_XDOT                'X'     /* use hidden-dot algorithm */
 # define M_7BITS       '7'     /* use 7-bit path */
 # define M_UGLYUUCP    'U'     /* this wants an ugly UUCP from line */
 # define M_XDOT                'X'     /* use hidden-dot algorithm */
 # define M_7BITS       '7'     /* use 7-bit path */
-# define M_8BITS       '8'     /* use 8-bit path */
 
 EXTERN MAILER  *Mailer[MAXMAILERS+1];
 
 
 EXTERN MAILER  *Mailer[MAXMAILERS+1];
 
index ca88512..15f75db 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)version.c  5.111 (Berkeley) %G%";
+static char sccsid[] = "@(#)version.c  5.112 (Berkeley) %G%";
 #endif /* not lint */
 
 #endif /* not lint */
 
-char   Version[] = "5.111";
+char   Version[] = "5.112";