Re: Perl includes and feature.h
On Tue, 2002-09-03 at 23:20, Torsten Landschoff wrote:
> Hi *,
>
> I am having a problem with Debian's perl 5.8. The following C source
> does not compile:
>
> #include <features.h>
> #include <EXTERN.h>
> #include <perl.h>
> #include <XSUB.h>
>
> I get the following error:
>
> In file included from /usr/lib/perl/5.8.0/CORE/op.h:480,
> from /usr/lib/perl/5.8.0/CORE/perl.h:2209,
> from test.c:3:
> /usr/lib/perl/5.8.0/CORE/reentr.h:602: field `_crypt_struct' has incomplete type
> In file included from /usr/lib/perl/5.8.0/CORE/perl.h:3368,
> from test.c:3:
> /usr/lib/perl/5.8.0/CORE/proto.h:246: parse error before `off64_t'
> etc. etc.
>
> Removing the #include <features.h> fixes this problem. Now, I have a
> package that first includes <string.h>, which in turn includes the
> evil <features.h>. It used to build fine with 5.6.1, as does the above
> C source, but now that does not work anymore.
I got this with postgresql. I cured it by adding -D_GNU_SOURCE to
CFLAGS.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"If any of you lack wisdom, let him ask of God, who
gives to all men generously and without reproach, and
it will be given to him." James 1:5
Reply to: