Note: Read the file ../INSTALL first!

If compling under DEC OSF/1 using DEC C++ 6.0 (cxx), you must use the
following compiler settings:

-nopt

    This disables automatic template instantiation. Automatic template
    instantiation is not necessary since the ORBacus source comes with
    support for explicit template instantiation.

-msg_disable pointer_conversion_loses_bits

    This disables an annoying warning message about pointer-to-int
    conversions. For example, the following code generates this
    warning:

    #include <assert.h>
    main()
    {
	char* p = "BlahBlah";
	assert(p);
    }

-msg_disable nested_comment

    Disables an annoying warning about "nested comments" (although
    there is no such thing in C++).

-distinguish_nested_enums

    This option is necessary in order to handle enums nested in
    classes.

-pthread

    This option is only necessary if ORBacus was compiled with
    JThreads/C++ support.

If you are using DEC C++ 6.2, the "-msg_disable nested_comment" and
"-msg_disable pointer_conversion_loses_bits" are no longer valid.  Instead
you need to specify "-msg_disable narrowptr".

Note that you do not need any special network libraries to link
ORBacus programs. The standard library contains everything that is
required.

The DEC C++ compiler has a very strange and annoying exception
handling bug. In case there is a try block, which does not have a
local variable with a destructor, the compiler sometimes runs into the
following internal error:

    Internal error: Unexpected null cleanup_block in
    unwind_cleanup_state.IOT/Abort trap (core dumped)

To avoid this, a "dummy" variable with a destructor must be added to
the try block. For example, the following code block from the GIOP
engine caused this bug:

    try
    {
	return receiveTimeout(reqId, buf, swap, status, t);
    }
    catch(const CORBA_SystemException&)
    {
	buf.consume(b -> buf());
	throw;
    }

To avoid the problem, the following fix was applied:

    try
    {
	CORBA_Object_var dummy; // Add local variable with destructor
                                // for buggy DEC C++
	return receiveTimeout(reqId, buf, swap, status, t);
    }
    catch(const CORBA_SystemException&)
    {
	buf.consume(b -> buf());
	throw;
    }

To avoid other compilers also using this workaround, ORBacus defines
the OB_DEC_TRY_FIX preprocessor macro, which is defined as
"CORBA_Object_var dummy;" in case the DEC compiler is used and empty
otherwise. With this macro, the fixed code looks as follows:

    try
    {
	OB_DEC_TRY_FIX
	return receiveTimeout(reqId, buf, swap, status, t);
    }
    catch(const CORBA_SystemException&)
    {
	buf.consume(b -> buf());
	throw;
    }

Hopefully there will be some compiler patch available for this in the
future.

In case you are using a multi-threaded ORBacus version with
JThreads/C++, please also follow the instructions from the README
files included with the JThreads/C++ distribution.

Note: ORBacus also works on DEC Alpha running Alpha Linux. See the
file README.ALPHA-LINUX for more information.
