Re: [PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-15 Thread Yaakov Selkowitz
On 2016-03-15 06:46, Corinna Vinschen wrote: On Mar 15 11:55, Václav Haisman wrote: Would it not be better to leave the original functions as they were and simply use these defines? #define bswap_16 bswap_16 #define bswap_32 bswap_32 #define bswap_64 bswap_64 I believe this is valid C and C++.

Re: [PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-15 Thread Corinna Vinschen
On Mar 15 11:55, Václav Haisman wrote: > On 15 March 2016 at 04: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). > > > > Signed-off-by: Yaakov Selkowitz > > --- > > winsup/cygwin/include/byteswa

Re: [PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-15 Thread Václav Haisman
On 15 March 2016 at 04: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). > > Signed-off-by: Yaakov Selkowitz > --- > winsup/cygwin/include/byteswap.h | 14 +- > 1 file changed, 9 insertio

Re: [PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-15 Thread Corinna Vinschen
On Mar 15 04:41, Yaakov Selkowitz wrote: > On 2016-03-15 04:22, Corinna Vinschen wrote: > >On Mar 15 04:14, Yaakov Selkowitz wrote: > >>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

Re: [PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-15 Thread Yaakov Selkowitz
On 2016-03-15 04:22, Corinna Vinschen wrote: On Mar 15 04:14, Yaakov Selkowitz wrote: 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.

Re: [PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-15 Thread Corinna Vinschen
On Mar 15 04:14, Yaakov Selkowitz wrote: > 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

Re: [PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-15 Thread Yaakov Selkowitz
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, __uint

Re: [PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-15 Thread Corinna Vinschen
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). > > Signed-off-by: Yaakov Selkowitz > --- > winsup/cygwin/include/byteswap.h | 14 +- > 1 file changed, 9 insertions(+), 5 d

[PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-14 Thread Yaakov Selkowitz
The bswap_* "functions" are macros in glibc, so they may be tested for by the preprocessor (e.g. #ifdef bswap_16). Signed-off-by: Yaakov Selkowitz --- winsup/cygwin/include/byteswap.h | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/include/byteswa