Embedding ruby - name clashes

Something to consider when embedding ruby: ruby.h defines some short names
which may clash with your main program.

Right now I am working on openldap-2.2.0alpha and trying to incorporate a
back-ruby backend (based on back-perl). Unfortunately, both Ruby and
OpenLDAP define a constant called ‘ID’ :frowning:

In fact they are compatible - both are

typedef unsigned long ID;

So I’m having to do macro tricks to get around this. Also note that
RE_DUP_MAX, defined in [archdir]/ruby.h, is a duplicate of RE_DUP_MAX in
<sys/syslimits.h> under FreeBSD, although the macros are compatible and so I
just get a warning rather than an error.

Just thought I’d mention it anyway.

Cheers,

Brian.