summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-06-01 12:13:42 +0200
committerYang Tse <yangsita@gmail.com>2011-06-01 12:13:42 +0200
commita689072f33ae5a3a59586fb419b2e3d6a74f5482 (patch)
tree45ca5dc29499416cfb859fa2c9179b0457d3c535 /lib
parent3d64ed25dfacef8b44835f2097d5fdc8ccc08b62 (diff)
downloadcurl-a689072f33ae5a3a59586fb419b2e3d6a74f5482.tar.gz
warnless: icc 9.1 workaround
Diffstat (limited to 'lib')
-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__ */