Commit 017ffb3030dacabf54fb3d74728009109b9f6476

Authored by oldfaber
Committed by Stéphane Raimbault
1 parent 1eabc8a0

Fix bswap macros for Microsoft Visual Studio C 2006 or newer

Showing 1 changed file with 3 additions and 0 deletions
src/modbus-data.c
@@ -39,6 +39,9 @@ @@ -39,6 +39,9 @@
39 # define bswap_32 __builtin_bswap32 39 # define bswap_32 __builtin_bswap32
40 # endif 40 # endif
41 #endif 41 #endif
  42 +#if defined(_MSC_VER) && (_MSC_VER >= 1400)
  43 +# define bswap_32 _byteswap_ulong
  44 +#endif
42 45
43 #if !defined(bswap_32) 46 #if !defined(bswap_32)
44 47