This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] Cygwin: define byteswap.h inlines as macros
- From: Yaakov Selkowitz <yselkowitz at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 15 Mar 2016 04:14:45 -0500
- Subject: Re: [PATCH] Cygwin: define byteswap.h inlines as macros
- Authentication-results: sourceware.org; auth=none
- References: <1458011636-8548-1-git-send-email-yselkowi at redhat dot com> <20160315090349 dot GA7819 at calimero dot vinschen dot de>
On 2016-03-15 04:03, Corinna Vinschen wrote:
On Mar 14 22:13, Yaakov Selkowitz wrote:
The bswap_* "functions" are macros in glibc, so they may be tested for
by the preprocessor (e.g. #ifdef bswap_16).
ACK.
While we're at it, what about converting the types to implicit types
(__uint16_t, __uint32_t, __uint64_t).
glibc uses short/int/long long for these, so I think we should leave them.
Also, do we want to convert the inline code to use the x86 bswap instructions?
Possibly, but SHTDI.
--
Yaakov