aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/warnless.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/warnless.c b/lib/warnless.c
index 8a2211019..37d15ce87 100644
--- a/lib/warnless.c
+++ b/lib/warnless.c
@@ -296,18 +296,26 @@ void curlx_FD_ZERO(fd_set *fdset)
unsigned short curlx_htons(unsigned short usnum)
{
+#if (__INTEL_COMPILER == 910) && defined(__i386__)
+ return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
+#else
#pragma warning(push)
#pragma warning(disable:810) /* conversion may lose significant bits */
return htons(usnum);
#pragma warning(pop)
+#endif
}
unsigned short curlx_ntohs(unsigned short usnum)
{
+#if (__INTEL_COMPILER == 910) && defined(__i386__)
+ return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
+#else
#pragma warning(push)
#pragma warning(disable:810) /* conversion may lose significant bits */
return ntohs(usnum);
#pragma warning(pop)
+#endif
}
#endif /* __INTEL_COMPILER && __unix__ */