summaryrefslogtreecommitdiffstats
path: root/include/asn1c/asn_system.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-08-31 08:56:53 +0200
committerHarald Welte <laforge@gnumonks.org>2015-08-31 09:35:13 +0200
commit41b85d5597119fa8105dc0641ffe5cd1bbae39b2 (patch)
tree1a425d76fafe089cca547eb9c79c6a9a631c34e2 /include/asn1c/asn_system.h
parentf6b9173b02bfac093177cf6fd0f48ad56c5786c7 (diff)
update to asn1c aper branch commit 6e00cbce7304a6972e82a12bb5fa82e41fa541be
which is closes to Lev Walkins master 62913d8b8e1eb96d74315ff748475ca818b69752
Diffstat (limited to 'include/asn1c/asn_system.h')
-rw-r--r--include/asn1c/asn_system.h12
1 files changed, 6 insertions, 6 deletions
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 <stdarg.h> /* For va_start */
#include <stddef.h> /* for offsetof and ptrdiff_t */
-#ifdef WIN32
+#ifdef _WIN32
#include <malloc.h>
#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 <stdint.h>
#endif /* _MSC_VER */
-#else /* !WIN32 */
+#else /* !_WIN32 */
#if defined(__vxworks)
#include <types/vxTypes.h>
@@ -90,7 +90,7 @@ typedef unsigned int uint32_t;
#endif /* defined(__vxworks) */
-#endif /* WIN32 */
+#endif /* _WIN32 */
#if __GNUC__ >= 3
#ifndef GCC_PRINTFLIKE