CORBA::ORBit 0.4.7 is ignoring include guards



Hi,

I have a script that loads multiple idl files, some of which have common
includes. The IDLs have include guards so should only load once.

The problem is that each IDL is loaded with a separate C preprocessor
invocation, so an IDL can get loaded more than once.

The following example shows the warnings that this problem causes.

#! /usr/bin/perl -w
use CORBA::ORBit idl => [qw( foo.idl foo.idl )];
use strict;

// foo.idl
#ifndef FOO_IDL
#define FOO_IDL
const string FOO = "FOO";
#endif

When run I get:
hadrian:~$ perl foo.pl

Constant subroutine FOO redefined at
/installed/ORBit-0.5.17/lib/perl5/site_perl/5.005/i386-linux/CORBA/ORBit.pm line 65535.

Anyone have any ideas? Perhaps all given IDLs could be loaded in one CPP
invocation?

Regards,
Alex.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]