summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_NS_unistd.inl
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/OS_NS_unistd.inl')
-rw-r--r--ACE/ace/OS_NS_unistd.inl5
1 files changed, 5 insertions, 0 deletions
diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl
index af393eb36be..bdc05b320df 100644
--- a/ACE/ace/OS_NS_unistd.inl
+++ b/ACE/ace/OS_NS_unistd.inl
@@ -1009,7 +1009,12 @@ ACE_OS::swab (const void *src,
const char *tmp = static_cast<const char*> (src);
char *from = const_cast<char *> (tmp);
char *to = static_cast<char *> (dest);
+# if defined (ACE_HAS_INT_SWAB)
+ int ilength = ACE_Utils::truncate_cast<int> (length);
+ ::swab (from, to, ilength);
+# else
::swab (from, to, length);
+# endif /* ACE_HAS_INT_SWAB */
#elif defined (ACE_HAS_CONST_CHAR_SWAB)
const char *from = static_cast<const char*> (src);
char *to = static_cast<char *> (dest);