[omniORB] omniidl3 and #inlucde

David Scott djs@uk.research.att.com
Wed, 20 Sep 2000 11:36:27 +0100 (BST)


On Tue, 12 Sep 2000, NODA Itsuki wrote:

> When omniidl processes #include line, for example,
> 
>      #include "foo.idl"
> 
> if the included file has no CORBA declarations, it does not
> generate 
> 
>      #include "foo.h" 
>
Indeed. The backend only knows about files that contained declarations--
the rest are dropped by the pre-processor/ front end. If this is a problem
you could work around it by putting a dummy declaration in the empty IDL
file?

> Another problem is that, if the omniidl processes multiple #include
> lines, the omniidl generate the reversed order of #include lines.
>
Oops! I've changed it in cvs so that the output order is the same as in
the original IDL.

The patch is a one-liner:

--- src/lib/omniORB2/omniidl_be/cxx/config.py   2000/07/18 15:34:18
1.12.2.8
+++ src/lib/omniORB2/omniidl_be/cxx/config.py   2000/09/19 14:04:51
1.12.2.9
@@ -107,7 +107,7 @@
     def add(self, node):
         file = node.file()
         if not(file in config.includes):
-            config.includes = [file] + config.includes
+            config.includes.append(file)
 
     def visitAST(self, node):
         self.add(node)

HTH!
 
David
-- 
  Dave Scott, Research Engineer, AT&T Laboratories Cambridge UK