[omniORB] namespace handling when a compiler doesn't support it

David Byron dbyron@coactive.com
Mon, 04 Jan 1999 15:43:58 -0800


Apologies if this has been dealt with before, but the archive search was down when I tried to look....

I am porting OmniORB2 to a compiler that doesn't support namespaces (Diab, for those interested).  The macros for dealing with namespaces when the compiler doesn't put code for a particular namespace in a class.

I have multiple files that share a namespace, as in:

file1.idl
---------
module foo
{
   // some declarations
};

file2.idl
---------
#include "file1.idl"

module foo
{
   // some more declarations
};

In file2.hh, this becomes:

#include <file1.hh>

class foo
{
  // some more declarations, turned into C++
}

Unfortunately, the stubs are trying to declare class foo twice, which my compiler flags as an error.

Am I using namespaces in an unexpected way, or is there another way to define the _CORBA_MODULE... macros to deal with this?  I can remove the namespace if I must, but I'd rather not.

Thanks for your help.

-DB
---
David Byron                     dbyron@coactive.com
Coactive Networks, Inc.         http://www.coactive.com
4000 Bridgeway, Suite 303       voice:(415)289-1722
Sausalito, CA  94965            fax:(415)289-1320