[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with mx lookups on DEC Alpha
- To: Zmailer discussion list <zmailer@nic.funet.fi>
- Subject: problem with mx lookups on DEC Alpha
- From: Tim DiLauro <timmo@jhu.edu>
- Date: Fri, 29 Nov 1996 22:54:27 -0500
I just jumped from 2.99.38 to .42 and ran into problems -- mx lookups
in smtp stopped working. The problem occurs in getmxrr(), when bumping cp
past the class and ttl values:
cp += sizeof(u_short) + sizeof(u_long);
u_long on an Alpha is 64-bits, but we're bumping past a 32-bit value. The
problem cropped up while moving getmxrr() from router/libdb/bind.c. bind.c
redefined u_long to u_int for Alpha.
I chose a different route, but there's got to be a better way (I don't
know how widely available INT32SZ is).
Applicable section of diff follows.
-timmo
Tim DiLauro Milton S. Eisenhower Library
Library Systems Jack Johns Hopkins University
(410) 516-5263 3400 N. Charles Street
timmo@jhu.edu Baltimore, MD 21218
--------------------------------
--- orig/transports/smtp/smtp.c Sun Nov 24 09:59:01 1996
+++ transports/smtp/smtp.c Fri Nov 29 22:32:22 1996
@@ -3060,7 +3057,12 @@
/*
class = _getshort(cp);
*/
- cp += sizeof(u_short) + sizeof(u_long);
+ cp += sizeof(u_short) + /* class */
+#if defined(__alpha) /* has 64-bit u_long */
+ INT32SZ; /* ttl */
+#else /* others have 32-bit u_long */
+ sizeof(u_long); /* ttl */
+#endif /* 32-bit v. sizeof(u_long) problem */
n = _getshort(cp);
cp += sizeof(u_short);
if (type == T_CNAME) {