[omniORB] Header file conflicts in OS X.

Visscher, Bruce VISSCHB at RJRT.com
Wed Nov 3 13:52:51 GMT 2004


Personally, I think Apple is at fault here, not omniORB.

> Changing the instances of 'nil' on those lines to 'is_nil' 
> will make the
> world a much happier place.

I don't like that at all.  I think is_nil should be reserved for member functions.

If the omniORB community has to do something, I would suggest one of the following.

1. Leave of the name of the argument out of the header file altogether ("Current(int);"
rather than "Current(int nil);".

2. Adopt a naming convention that avoids these kinds of conflicts in the future.  A
clever one that was used at one point was to start a name with _0RL (numeral '0').
This has the advantage that it won't be likely to conflict with anything and you don't
have to decide whether to classify omniORB as part of "The Implementation". [The C++
standard reserves identifiers that satisfy certain naming conventions (e.g. identifiers
that start with two underscores or one  underscore followed by an upper case letter) as
belonging to "the implementation". So, whether omniORB is allowed to use such names
depends on whether you think omniORB should be considered part of "the" implementation.
BTW, this is why I fault Apple. They *are* the implemention (aren't they?) so they have
no buisiness #define'ing nil as a macro. It belongs to the user (you). Therefore, they
are stepping on your toes!]

3. Tell people not to use broken libraries (just kidding).

Option 1 might be a good short term solution if this is deemed an important enough problem.

In the meantime, can't you just:

#include <CoreFoundation/CFString.h>
#undef nil
#include <omniORB4/CORBA.h>

??

-----------------------------------------
CONFIDENTIALITY NOTE:  This e-mail message, including any  attachment(s),
contains information that may be confidential,  protected by the attorney-
client or other legal privileges, and/or  proprietary non-public
information.  If you are not an intended  recipient of this message or an
authorized assistant to an intended  recipient, please notify the sender by
replying to this message and  then delete it from your system.  Use,
dissemination, distribution,  or reproduction of this message and/or any of
its attachments (if  any) by unintended recipients is not authorized and
may be unlawful.




More information about the omniORB-list mailing list