support for SunOS 4.0.3 and the LUNA
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 25 May 1995 21:24:43 +0000 (13:24 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 25 May 1995 21:24:43 +0000 (13:24 -0800)
SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.175
SCCS-vsn: usr.sbin/sendmail/src/conf.h 8.167

usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/conf.h

index 959918e..76d3c94 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     8.174 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     8.175 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -2933,6 +2933,43 @@ strtol(nptr, endptr, base)
        return (acc);
 }
 
        return (acc);
 }
 
+#endif
+\f/*
+**  STRSTR -- find first substring in string
+**
+**     Parameters:
+**             big -- the big (full) string.
+**             little -- the little (sub) string.
+**
+**     Returns:
+**             A pointer to the first instance of little in big.
+**             big if little is the null string.
+**             NULL if little is not contained in big.
+*/
+
+#ifdef NEEDSTRSTR
+
+char *
+strstr(big, little)
+       char *big;
+       char *little;
+{
+       register char *p = big;
+       int l;
+
+       if (*little == '\0')
+               return big;
+       l = strlen(little);
+
+       while ((p = strchr(p, *little)) != NULL)
+       {
+               if (strncmp(p, little, l) == 0)
+                       return p;
+               p++;
+       }
+       return NULL;
+}
+
 #endif
 \f/*
 **  SM_GETHOSTBY{NAME,ADDR} -- compatibility routines for gethostbyXXX
 #endif
 \f/*
 **  SM_GETHOSTBY{NAME,ADDR} -- compatibility routines for gethostbyXXX
index abab836..ac665d9 100644 (file)
@@ -5,7 +5,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)conf.h      8.166 (Berkeley) %G%
+ *     @(#)conf.h      8.167 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -288,6 +288,7 @@ extern int  syslog(int, char *, ...);
                        /* special tweaking for SunOS 4.0.3 */
 #   include <malloc.h>
 #   define SYS5SIGNALS 1       /* SysV signal semantics -- reset on each sig */
                        /* special tweaking for SunOS 4.0.3 */
 #   include <malloc.h>
 #   define SYS5SIGNALS 1       /* SysV signal semantics -- reset on each sig */
+#   define NEEDSTRSTR  1       /* need emulation of strstr(3) routine */
 #   define WAITUNION   1       /* use "union wait" as wait argument type */
 #   undef WIFEXITED
 #   undef WEXITSTATUS
 #   define WAITUNION   1       /* use "union wait" as wait argument type */
 #   undef WIFEXITED
 #   undef WEXITSTATUS
@@ -1222,6 +1223,7 @@ typedef int               (*sigfunc_t)();
 # define HASUNSETENV   1       /* has unsetenv(2) call */
 # define NEEDPUTENV    1       /* need putenv(3) call */
 # define NEEDGETOPT    1       /* need a replacement for getopt(3) */
 # define HASUNSETENV   1       /* has unsetenv(2) call */
 # define NEEDPUTENV    1       /* need putenv(3) call */
 # define NEEDGETOPT    1       /* need a replacement for getopt(3) */
+# define NEEDSTRSTR    1       /* need emulation of the strstr(3) call */
 # define WAITUNION     1       /* use "union wait" as wait argument type */
 # ifdef uniosb
 #  define LA_TYPE      LA_INT
 # define WAITUNION     1       /* use "union wait" as wait argument type */
 # ifdef uniosb
 #  define LA_TYPE      LA_INT