On Fri, Sep 18, 2009 at 05:05:39PM -0700, Ira Weiny wrote: > > I'd say just use the ntohl, ntohs, and bswap64 macros directly and > > Window can provide headers with whatever it needs instead. They are > > already doing this.. > > I agree but ntohl etc do not seem to work for the macros which are defined.
Yah, thats right they don't work for case labels, that is about the only case they don't work for.. Might even be a gcc bug? > #define IB_MAD_ATTR_CLASS_PORT_INFO (CL_HTON16(0x0001)) OMG that is gross > Thus the > > #define __bswap_constant_16(x) \ > ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) Well, no, that is to support the __builtin_constant_p method I clipped, that macro isn't for user use. Guess you are stuck with the upper and lower case versions of the macros. Sucky Jason _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
