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 htonll ntohll
> +#endif
> +

The inline verions of these had the advantage that they enforce the
type, particularly on BE systems, it is a nice check to have..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to