From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Jarod Wilson <jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH rdma-core] libibumad: clean up htonll/ntohnll handling
Date: Wed, 24 May 2017 10:33:01 -0600 [thread overview]
Message-ID: <20170524163301.GA7054@obsidianresearch.com> (raw)
In-Reply-To: <20170522141722.50502-1-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
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.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-05-24 16:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 14:17 [PATCH rdma-core] libibumad: clean up htonll/ntohnll handling Jarod Wilson
[not found] ` <20170522141722.50502-1-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-05-22 15:31 ` Hal Rosenstock
2017-05-24 16:33 ` Jason Gunthorpe [this message]
[not found] ` <20170524163301.GA7054-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-05-27 22:01 ` Jarod Wilson
2017-05-30 3:52 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170524163301.GA7054@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).