From 6c6797d98f60fd0a44535aa934d5e9f6bbf351f5 Mon Sep 17 00:00:00 2001 From: parsons Date: Thu, 2 Sep 1999 13:14:40 +0000 Subject: Had to make the alignment changes specific only to Borland. --- TAO/tao/decode.cpp | 6 ++---- TAO/tao/deep_free.cpp | 6 ++---- TAO/tao/encode.cpp | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp index 1ff0746023a..25ecce0f33c 100644 --- a/TAO/tao/decode.cpp +++ b/TAO/tao/decode.cpp @@ -600,10 +600,8 @@ TAO_Marshal_Struct::decode (CORBA::TypeCode_ptr tc, alignment = param->alignment (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP); - // MSVC built code works with either of these, but Borland - // Builder needs the first one, whereas Sun compilers - // need the second one. -#if defined (WIN32) + // Borland Builder aligns things a little differently. +#if defined (__BORLANDC__) align_offset = (ptr_arith_t) ptr_align_binary (data, alignment) - (ptr_arith_t) data diff --git a/TAO/tao/deep_free.cpp b/TAO/tao/deep_free.cpp index fcf04851858..26a74d48c1d 100644 --- a/TAO/tao/deep_free.cpp +++ b/TAO/tao/deep_free.cpp @@ -211,10 +211,8 @@ TAO_Marshal_Struct::deep_free (CORBA::TypeCode_ptr tc, alignment = param->alignment (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP); - // MSVC built code works with either of these, but Borland - // Builder needs the first one, whereas Sun compilers - // need the second one. -#if defined (WIN32) + // Borland Builder aligns things a little differently. +#if defined (__BORLANDC__) align_offset = (ptr_arith_t) ptr_align_binary (source, alignment) - (ptr_arith_t) source diff --git a/TAO/tao/encode.cpp b/TAO/tao/encode.cpp index a1f825e3a37..cc826240eb4 100644 --- a/TAO/tao/encode.cpp +++ b/TAO/tao/encode.cpp @@ -316,10 +316,8 @@ TAO_Marshal_Struct::encode (CORBA::TypeCode_ptr tc, alignment = param->alignment (ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP); - // MSVC built code works with either of these, but Borland - // Builder needs the first one, whereas Sun compilers - // need the second one. -#if defined (WIN32) + // Borland Builder aligns things a little differently. +#if defined (__BORLANDC__) align_offset = (ptr_arith_t) ptr_align_binary (data, alignment) - (ptr_arith_t) data -- cgit v1.2.1