diff options
author | Yang Tse <yangsita@gmail.com> | 2011-06-01 12:13:42 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-06-01 12:13:42 +0200 |
commit | a689072f33ae5a3a59586fb419b2e3d6a74f5482 (patch) | |
tree | 45ca5dc29499416cfb859fa2c9179b0457d3c535 /lib | |
parent | 3d64ed25dfacef8b44835f2097d5fdc8ccc08b62 (diff) | |
download | curl-a689072f33ae5a3a59586fb419b2e3d6a74f5482.tar.gz |
warnless: icc 9.1 workaround
Diffstat (limited to 'lib')
-rw-r--r-- | lib/warnless.c | 8 |
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__ */ |