Commit 67cacf8c54b41bf0f6b62398e75fe518505f964c
1 parent
7ef3fa5f
Improve ifdef around bswap_16 for __CYGWIN__
Showing
1 changed file
with
1 additions
and
3 deletions
src/modbus-data.c
| ... | ... | @@ -50,15 +50,13 @@ |
| 50 | 50 | # define bswap_16 _byteswap_ushort |
| 51 | 51 | #endif |
| 52 | 52 | |
| 53 | -#if !defined(__CYGWIN__) | |
| 54 | -#if !defined(bswap_16) | |
| 53 | +#if !defined(__CYGWIN__) && !defined(bswap_16) | |
| 55 | 54 | # warning "Fallback on C functions for bswap_16" |
| 56 | 55 | static inline uint16_t bswap_16(uint16_t x) |
| 57 | 56 | { |
| 58 | 57 | return (x >> 8) | (x << 8); |
| 59 | 58 | } |
| 60 | 59 | #endif |
| 61 | -#endif | |
| 62 | 60 | |
| 63 | 61 | #if !defined(bswap_32) |
| 64 | 62 | # warning "Fallback on C functions for bswap_32" | ... | ... |