define $=w to include long host name
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 26 Mar 1993 06:27:05 +0000 (22:27 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 26 Mar 1993 06:27:05 +0000 (22:27 -0800)
SCCS-vsn: usr.sbin/sendmail/src/main.c 6.46

usr/src/usr.sbin/sendmail/src/main.c

index b31e4c4..999035f 100644 (file)
@@ -13,7 +13,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     6.45 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     6.46 (Berkeley) %G%";
 #endif /* not lint */
 
 #define        _DEFINE
 #endif /* not lint */
 
 #define        _DEFINE
@@ -322,15 +322,16 @@ main(argc, argv, envp)
                        printf("canonical name: %s\n", jbuf);
                p = newstr(jbuf);
                define('w', p, CurEnv);
                        printf("canonical name: %s\n", jbuf);
                p = newstr(jbuf);
                define('w', p, CurEnv);
+               setclass('w', p);
 
                q = strchr(jbuf, '.');
                if (q != NULL)
                {
                        *q++ = '\0';
 
                q = strchr(jbuf, '.');
                if (q != NULL)
                {
                        *q++ = '\0';
-                       p = newstr(jbuf);
                        define('m', q, CurEnv);
                        define('m', q, CurEnv);
+                       p = newstr(jbuf);
+                       setclass('w', p);
                }
                }
-               setclass('w', p);
 
                if (uname(&utsname) >= 0)
                        p = utsname.nodename;
 
                if (uname(&utsname) >= 0)
                        p = utsname.nodename;