RE: [PATCH] libibmad: Fix conflict with new umad.h header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Fri, Feb 24, 2017 at 12:40:27AM -0500, ira.weiny@xxxxxxxxx wrote:
> > From: Ira Weiny <ira.weiny@xxxxxxxxx>
> 
> Bleck, how did this ever work sanely like this??

I don't know...

Libibmad should have been combined into infinband-diags years ago...  I just never seem to have the time...

> 
> This is the version you should copy:
> 
> #ifndef ntohll
> #undef htonll
> #undef ntohll
> /* Users should use the glibc functions directly, not these wrappers */ static
> inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return
> htobe64(x); } static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t
> x) { return be64toh(x); } #define htonll htonll #define ntohll ntohll #endif

Perhaps...

The question is do you want to rely on BSD or gnu extensions?  My reading of the various man pages leads me to the same path as you.  That the BSD htobe* has become the standard in glibc.

However, anyone currently using libibmad must have bswap_*.  Therefore this will not break them.

> 
> > +#define ntohll(x) x
> 
> missing () around the x.

Yea missed that...

Thanks,
Ira

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux