Skip to content

Commit

Permalink
Improve ifdef around bswap_16 for __CYGWIN__
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane committed May 20, 2016
1 parent 7ef3fa5 commit 67cacf8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/modbus-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,13 @@
# define bswap_16 _byteswap_ushort
#endif

#if !defined(__CYGWIN__)
#if !defined(bswap_16)
#if !defined(__CYGWIN__) && !defined(bswap_16)
# warning "Fallback on C functions for bswap_16"
static inline uint16_t bswap_16(uint16_t x)
{
return (x >> 8) | (x << 8);
}
#endif
#endif

#if !defined(bswap_32)
# warning "Fallback on C functions for bswap_32"
Expand Down

0 comments on commit 67cacf8

Please sign in to comment.