[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more DEC Alpha diffs



long ints are 64 bits on an Alpha; this breaks the DNS parsing code
in transports/smtp.c.  There are probably other things that need fixing,
like using time_t instead of long for times, but this looks like the most
important one:

*** 1.3	1993/05/14 23:29:42
--- smtp.c	1993/08/20 03:16:15
***************
*** 82,87 ****
--- 82,89 ----
  
  #define MAXFORWARDERS	128	/* Max number of MX rr's that can be listed */
  
+ typedef unsigned int u_int32_t;	/* should work on Alphas */
+ 
  char myhostname[MAXHOSTNAMELEN+1];
  char remotehost[MAXHOSTNAMELEN+1];
  char remotemsg[BUFSIZ];
***************
*** 1266,1272 ****
  		/*
  		class = _getshort(cp);
  		*/
!  		cp += sizeof(u_short) + sizeof(u_long);
  		n = _getshort(cp);
  		cp += sizeof(u_short);
  		if (type == T_CNAME) {
--- 1263,1269 ----
  		/*
  		class = _getshort(cp);
  		*/
!  		cp += sizeof(u_short) + sizeof(u_int32_t);
  		n = _getshort(cp);
  		cp += sizeof(u_short);
  		if (type == T_CNAME) {
***************
*** 1454,1460 ****
  		type = _getshort(cp);
   		cp += sizeof(u_short);				/* type */
   		cp += sizeof(u_short);				/* class */
! 		cp += sizeof(u_long);				/* ttl */
  		n = _getshort(cp);
  		cp += sizeof(u_short);				/* dlen */
  		if (type != rrtype) {
--- 1451,1457 ----
  		type = _getshort(cp);
   		cp += sizeof(u_short);				/* type */
   		cp += sizeof(u_short);				/* class */
! 		cp += sizeof(u_int32_t);			/* ttl */
  		n = _getshort(cp);
  		cp += sizeof(u_short);				/* dlen */
  		if (type != rrtype) {
***************
*** 1470,1481 ****
  			/* If we have seen a WKS, it had better have SMTP,
  			 * however in absence of a WKS, assume SMTP.
  			 */
! 			if (n < sizeof (u_long) + 1) {
  				cp = nextcp;	/* ? */
  				continue;
  			}
  			ok = 0;
! 			cp += sizeof(u_long);		/* skip IP address */
  			if (*cp++ == IPPROTO_TCP) {	/* check protocol */
  				if (cp + (IPPORT_SMTP/8) < nextcp
  				    && (*(cp+(IPPORT_SMTP/8))
--- 1467,1478 ----
  			/* If we have seen a WKS, it had better have SMTP,
  			 * however in absence of a WKS, assume SMTP.
  			 */
! 			if (n < sizeof (u_int32_t) + 1) {
  				cp = nextcp;	/* ? */
  				continue;
  			}
  			ok = 0;
! 			cp += sizeof(u_int32_t);		/* skip IP address */
  			if (*cp++ == IPPROTO_TCP) {	/* check protocol */
  				if (cp + (IPPORT_SMTP/8) < nextcp
  				    && (*(cp+(IPPORT_SMTP/8))