[omniORB] Minor bug in the cdrStream.h

Serguei Kolos Serguei.Kolos@cern.ch
Wed Apr 30 08:44:02 2003


Hello

I have tried to use -ansi option for g++ compiler (this was not my choice)
to build the OMNI 4.0.1. The problem is that the ansi standard does not
have the "long long" type. I commented out some "#define HAS_LongLong" 
statements
in the CORBA_sysdep_trad.h file, but then I found that some "#ifdef 
HAS_LongLong"
statements are missing in the cdrStream.h. Here is the patch:

 > diff -c cdrStream.h ~/omniORB-4.0.1/include/omniORB4/cdrStream.h

*** cdrStream.h    Wed Apr 30 09:36:25 2003
--- ~/omniORB-4.0.1/include/omniORB4/cdrStream.h    Sun Mar  2 18:10:41 2003
***************
*** 286,292 ****
      }
    }
 
- #ifdef HAS_LongLong
    friend inline void operator>>= (_CORBA_LongLong a, cdrStream& s) {
      if (s.pd_marshal_byte_swap) {
        _CORBA_LongLong t = Swap64(a);
--- 286,291 ----
***************
*** 318,324 ****
        a = t;
      }
    }
- #endif 
  #else
    friend inline void operator>>= (_CORBA_Short      a, cdrStream& s);
    friend inline void operator<<= (_CORBA_Short&     a, cdrStream& s);
--- 317,322 ----
***************
*** 328,340 ****
    friend inline void operator<<= (_CORBA_Long&      a, cdrStream& s);
    friend inline void operator>>= (_CORBA_ULong      a, cdrStream& s);
    friend inline void operator<<= (_CORBA_ULong&     a, cdrStream& s);
- #ifdef HAS_LongLong
    friend inline void operator>>= (_CORBA_LongLong   a, cdrStream& s);
    friend inline void operator<<= (_CORBA_LongLong&  a, cdrStream& s);
    friend inline void operator>>= (_CORBA_ULongLong  a, cdrStream& s);
    friend inline void operator<<= (_CORBA_ULongLong& a, cdrStream& s);
  #endif
- #endif
 
  #if !defined(NO_FLOAT)
 
--- 326,336 ----
***************
*** 851,857 ****
    }
  }
 
- #ifdef HAS_LongLong
  inline void operator>>= (_CORBA_LongLong a, cdrStream& s) {
    if (s.pd_marshal_byte_swap) {
      _CORBA_LongLong t = Swap64(a);
--- 847,852 ----
***************
*** 883,889 ****
      a = t;
    }
  }
- #endif
 
  #if !defined(NO_FLOAT)
 
--- 878,883 ----