From 41b85d5597119fa8105dc0641ffe5cd1bbae39b2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 31 Aug 2015 08:56:53 +0200 Subject: update to asn1c aper branch commit 6e00cbce7304a6972e82a12bb5fa82e41fa541be which is closes to Lev Walkins master 62913d8b8e1eb96d74315ff748475ca818b69752 --- include/asn1c/asn_system.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/asn1c/asn_system.h') diff --git a/include/asn1c/asn_system.h b/include/asn1c/asn_system.h index 0a9b092..e420ad2 100644 --- a/include/asn1c/asn_system.h +++ b/include/asn1c/asn_system.h @@ -21,7 +21,7 @@ #include /* For va_start */ #include /* for offsetof and ptrdiff_t */ -#ifdef WIN32 +#ifdef _WIN32 #include #define snprintf _snprintf @@ -29,9 +29,9 @@ /* To avoid linking with ws2_32.lib, here's the definition of ntohl() */ #define sys_ntohl(l) ((((l) << 24) & 0xff000000) \ - | (((l) << 16) & 0xff0000) \ - | (((l) << 8) & 0xff00) \ - | ((l) & 0xff)) + | (((l) << 8) & 0xff0000) \ + | (((l) >> 8) & 0xff00) \ + | ((l >> 24) & 0xff)) #ifdef _MSC_VER /* MSVS.Net */ #ifndef __cplusplus @@ -57,7 +57,7 @@ typedef unsigned int uint32_t; #include #endif /* _MSC_VER */ -#else /* !WIN32 */ +#else /* !_WIN32 */ #if defined(__vxworks) #include @@ -90,7 +90,7 @@ typedef unsigned int uint32_t; #endif /* defined(__vxworks) */ -#endif /* WIN32 */ +#endif /* _WIN32 */ #if __GNUC__ >= 3 #ifndef GCC_PRINTFLIKE -- cgit v1.2.3