Discussion:
[omniORB] omniidl and C++ include guard naming
Austin Bingham
2007-04-10 00:51:38 UTC
Permalink
Is there any way to control the names that omniidl uses when generating
include guards in C++ headers? If I'm dealing with two sets of IDL, both
of which have a (for instance) Util.idl, the generated header files will
both use the same macro definition for the include guard. Is there any way
I can tell the C++ backend to use some sort of pre/suffix to differentiate
these names? The problem, of course, is that these macros collide if some
translation unit includes both of these generated headers. Thanks.

--
Austin Bingham

Signal & Information Sciences Laboratory
Applied Research Laboratories, University of Texas at Austin
10000 Burnet Rd., Austin, TX 78758

email: ***@arlut.utexas.edu
cell: (512) 799-2444
office: (512) 835-3832
Duncan Grisby
2007-04-12 20:33:38 UTC
Permalink
Post by Austin Bingham
Is there any way to control the names that omniidl uses when generating
include guards in C++ headers? If I'm dealing with two sets of IDL, both
of which have a (for instance) Util.idl, the generated header files will
both use the same macro definition for the include guard. Is there any way
I can tell the C++ backend to use some sort of pre/suffix to differentiate
these names? The problem, of course, is that these macros collide if some
translation unit includes both of these generated headers. Thanks.
No, I'm afraid not. Can you just rename your IDL files to avoid
confusion?

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Austin Bingham
2007-04-12 21:56:32 UTC
Permalink
Post by Duncan Grisby
Post by Austin Bingham
Is there any way to control the names that omniidl uses when generating
include guards in C++ headers? If I'm dealing with two sets of IDL, both
of which have a (for instance) Util.idl, the generated header files will
both use the same macro definition for the include guard. Is there any way
I can tell the C++ backend to use some sort of pre/suffix to differentiate
these names? The problem, of course, is that these macros collide if some
translation unit includes both of these generated headers. Thanks.
No, I'm afraid not. Can you just rename your IDL files to avoid
confusion?
In this case I might be able to get away with it, but this problem seems
untenable in the general case. I'd be happy to look into adding this
functionality to the C++ backend, if others think it's reasonable. Should
I perhaps take this up on the dev list?

Austin

Loading...