Re: [PATCH rdma-core] libibumad: clean up htonll/ntohnll handling

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

 



On 2017-05-24 12:33 PM, Jason Gunthorpe wrote:
On Mon, May 22, 2017 at 10:17:22AM -0400, Jarod Wilson wrote:
Only ntohll was being checked to see if it wasn't defined, and was then
redefining htonll as well as ntohll. This was causing some problems for
the compile of the opa-ff package. Simple enough to rearrange this code a
bit such that htonll and ntohll are handled entirely independent of one
another.

What problem did this cause?

+/* Users should use the glibc functions directly, not these wrappers */
  #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
+#ifndef htonll
+#undef htonll

Both these undefs are not needed anymore.

Seems fine to me, if not weird that something would have a problem
here.

My understanding from Honggang is that this was necessary for him to get opa-ff and infiniband-diags to compile (along with an update to our libibmad package). He should be able to fill in the blanks with further details.

--
Jarod Wilson
jarod@xxxxxxxxxx
--
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