summaryrefslogtreecommitdiff
path: root/TAO/tao/AnyTypeCode
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-06-03 19:02:25 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-06-03 19:02:25 +0000
commit8e66d97bdba44c0c813572fb0554ff3b921f8cd3 (patch)
tree4397687fb29fa7327f03a2fbf2e765946f9d4b83 /TAO/tao/AnyTypeCode
parentbcdb4547021f4824589eaac63912340e242630ee (diff)
downloadATCD-8e66d97bdba44c0c813572fb0554ff3b921f8cd3.tar.gz
ChangeLogTag: Fri Jun 3 18:54:59 UTC 2011 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/tao/AnyTypeCode')
-rw-r--r--TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp22
-rw-r--r--TAO/tao/AnyTypeCode/Any_Basic_Impl.h5
2 files changed, 26 insertions, 1 deletions
diff --git a/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp b/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp
index e90b3cd1162..252777f91c9 100644
--- a/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp
+++ b/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp
@@ -63,9 +63,14 @@ namespace TAO
#endif
break;
#endif
+#if !defined (NONNATIVE_LONGDOUBLE)
+ // Portable impl of non-native long double requires a struct
+ // with constructors, which can't be a C++ union member,
+ // at least until C++0x is adopted.
case CORBA::tk_longdouble:
this->u_.ld = *static_cast<CORBA::LongDouble *> (value);
break;
+#endif
case CORBA::tk_wchar:
this->u_.wc = *static_cast<CORBA::WChar *> (value);
break;
@@ -198,8 +203,13 @@ namespace TAO
case CORBA::tk_ulonglong:
return cdr << this->u_.ull;
#endif
+#if !defined (NONNATIVE_LONGDOUBLE)
+ // Portable impl of non-native long double requires a struct
+ // with constructors, which can't be a C++ union member,
+ // at least until C++0x is adopted.
case CORBA::tk_longdouble:
return cdr << this->u_.ld;
+#endif
case CORBA::tk_wchar:
return cdr << CORBA::Any::from_wchar (this->u_.wc);
default:
@@ -245,8 +255,13 @@ namespace TAO
case CORBA::tk_ulonglong:
return cdr >> this->u_.ull;
#endif
+#if !defined (NONNATIVE_LONGDOUBLE)
+ // Portable impl of non-native long double requires a struct
+ // with constructors, which can't be a C++ union member,
+ // at least until C++0x is adopted.
case CORBA::tk_longdouble:
return cdr >> this->u_.ld;
+#endif
case CORBA::tk_wchar:
return cdr >> CORBA::Any::to_wchar (this->u_.wc);
default:
@@ -283,7 +298,7 @@ namespace TAO
break;
case CORBA::tk_longdouble:
{
- CORBA::LongDouble tmp = ACE_CDR_LONG_DOUBLE_INITIALIZER;
+ CORBA::LongDouble tmp (0.0L);
ACE_NEW_RETURN (retval,
TAO::Any_Basic_Impl (tc, &tmp),
0);
@@ -360,9 +375,14 @@ namespace TAO
*static_cast<CORBA::LongLong *> (dest) = src->u_.ull;
#endif
#endif
+#if !defined (NONNATIVE_LONGDOUBLE)
+ // Portable impl of non-native long double requires a struct
+ // with constructors, which can't be a C++ union member,
+ // at least until C++0x is adopted.
case CORBA::tk_longdouble:
*static_cast<CORBA::LongDouble *> (dest) = src->u_.ld;
break;
+#endif
case CORBA::tk_wchar:
*static_cast<CORBA::WChar *> (dest) = src->u_.wc;
break;
diff --git a/TAO/tao/AnyTypeCode/Any_Basic_Impl.h b/TAO/tao/AnyTypeCode/Any_Basic_Impl.h
index 848056f6ab4..c0482ec5e6c 100644
--- a/TAO/tao/AnyTypeCode/Any_Basic_Impl.h
+++ b/TAO/tao/AnyTypeCode/Any_Basic_Impl.h
@@ -88,7 +88,12 @@ namespace TAO
// Use signed long long as the container.
CORBA::LongLong ull;
#endif
+#if !defined (NONNATIVE_LONGDOUBLE)
+ // Portable impl of non-native long double requires a struct
+ // with constructors, which can't be a C++ union member,
+ // at least until C++0x is adopted.
CORBA::LongDouble ld;
+#endif
CORBA::WChar wc;
}u_;
};