[RFC 11/12] ib-mgmt: move ntohll/htonll from mad.h to umad.h

2010-10-23 Thread Hefty, Sean
Users of umad require ntohll/htonll to set/extract data from MADs. Move the definition from libibmad to libibumad. Signed-off-by: Sean Hefty sean.he...@intel.com --- libibmad/include/infiniband/mad.h | 29 + libibmad/include/infiniband/mad_osd.h |2 --

Re: [RFC 11/12] ib-mgmt: move ntohll/htonll from mad.h to umad.h

2010-10-23 Thread Jason Gunthorpe
On Sat, Oct 23, 2010 at 12:12:58AM -0700, Hefty, Sean wrote: +#if __BYTE_ORDER == __LITTLE_ENDIAN + #ifndef ntohll +#define ntohll(x) bswap_64(x) + #endif +#elif __BYTE_ORDER == __BIG_ENDIAN + #ifndef ntohll +#define ntohll(x) (x) + #endif +#endif +#ifndef htonll + #define