[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Building Openldap with back-perl on HPUX



Meuthen, Roland writes:

> Has anybody tried to build openldap with back-perl on HPUX?

Not me...

> When i try, there is alwasy a conflict between perl.h/mg.h from the
> Perl Distribution and magic.h from HPUX. In both files there is used a
> struct called magic. By including <stdio.h> in the c-files from
> back-perl the magic.h is activated an then theres an double
> definition.

perl.h #includes stdio.h, so this sounds strange.  I don't see how Perl
would compile at all, so it wouldn't be installed.  Are you sure magic.h
is included from stdio.h?  Does this 3-line program fail to compile?
   #include <EXTERN.h>
   #include <perl.h>
   #include <stdio.h>
If not, please look again at the errors to find out how magic.h gets
included.

> I tried thos with differen Perl an HPUX Versions. The Problem is
> always the same.
> 
> Has anyone a hint what to do?

Maybe you can fix it by putting
    #define magic Perl_magic
before the Perl files are #included and
    #undef  magic
afterwards.  Or to keep the changes in one place, put this in
OpenLDAP/include/perl.h:
    #define magic Perl_magic
    #include </path/to/your/real/perl.h>
    #undef  magic
Does that work?

-- 
Hallvard