summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-28 17:03:03 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-28 17:03:03 +0000
commite713a1cb53720f8c22d2bbb34b19398cf50c42e6 (patch)
tree20d333958c1768d7750439619a0a77fc45543f2b
parente9ffd21aae9d5c7e380c75444727725b8eda6d6d (diff)
downloadATCD-e713a1cb53720f8c22d2bbb34b19398cf50c42e6.tar.gz
Added operator== and operator!= for non-native long double.
-rw-r--r--TAO/tao/ORB.cpp14
-rw-r--r--TAO/tao/ORB.h5
2 files changed, 18 insertions, 1 deletions
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index 6c37d0de827..01d3e902559 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -116,6 +116,20 @@ CORBA::string_dup (const CORBA::Char *str)
return CORBA::string_copy (str);
}
+#if defined (NONNATIVE_LONGDOUBLE)
+int
+CORBA::LongDouble::operator== (CORBA::LongDouble &rhs)
+{
+ return ACE_OS::memcmp (this->ld, rhs.ld, 16) == 0;
+}
+
+int
+CORBA::LongDouble::operator!= (CORBA::LongDouble &rhs)
+{
+ return ACE_OS::memcmp (this->ld, rhs.ld, 16) != 0;
+}
+#endif /* NONNATIVE_LONGDOUBLE */
+
CORBA_ORB::CORBA_ORB (void)
: refcount_ (1),
open_called_ (0),
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index 97d1941db19..908c1692eac 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -333,9 +333,12 @@ public:
typedef long double LongDouble;
# else
# define NONNATIVE_LONGDOUBLE
- struct LongDouble
+ struct TAO_Export LongDouble
{
char ld[16];
+ int operator== (LongDouble &rhs);
+ int operator!= (LongDouble &rhs);
+ // @@ also need other comparison operators.
};
# endif /* ACE_SIZEOF_LONG_DOUBLE != 16 */