summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_NS_math.h
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2007-05-21 17:40:17 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2007-05-21 17:40:17 +0000
commitadef108f862040e86578bad37e6795cd68b7a31b (patch)
tree0bef8998d785361f1c97ed8b97a0c4f14da5f2cf /ACE/ace/OS_NS_math.h
parent9333fb43f7606f9c33f0fe7119b70e9a268a3937 (diff)
downloadATCD-adef108f862040e86578bad37e6795cd68b7a31b.tar.gz
ChangeLogTag:Mon May 21 10:32:02 UTC 2007 Ossama Othman <ossama_othman at symantec dot com>
Diffstat (limited to 'ACE/ace/OS_NS_math.h')
-rw-r--r--ACE/ace/OS_NS_math.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/ACE/ace/OS_NS_math.h b/ACE/ace/OS_NS_math.h
index e1803d9e1a8..e28f1e2045c 100644
--- a/ACE/ace/OS_NS_math.h
+++ b/ACE/ace/OS_NS_math.h
@@ -47,7 +47,18 @@ inline double ace_log2_helper (double x)
return log2 (x);
#undef log2
#else
+# if defined (_MSC_VER) && (_MSC_VER <= 1400)
+ // VC++ doesn't support log2() in the standard SDK. It is
+ // apparently available in the DirectX SDK, however. Generate an
+ // NaN for now. Note that VC++ doesn't appear to define a NaN
+ // constant.
+ ACE_UNUSED_ARG (x);
+ unsigned long const NaN[2]= { 0xffffffff, 0x7fffffff };
+ return *reinterpret_cast<double const *> (NaN);
+
+# else
return ACE_STD_NAMESPACE::log2 (x);
+#endif /* _MSC_VER <= 1400 */
#endif /* defined (log2) */
}