Re: h2xs problem

[email protected] (Tim Bunce) Tue, 28 Aug 2001 11:55:22 +0100
Newsgroups perl.dbi.oracle-oci
Message-ID <[email protected]>
On Mon, Aug 27, 2001 at 12:26:55PM -0700, Rob McMillin wrote:
> 
> > Second of all, has Tim been in touch with you about the mysterious
> > Running h2xs...
> > Scanning typemaps...
> >  Scanning /usr/lib/perl5/5.6.1/ExtUtils/typemap
> > Scanning /oracle/rdbms/demo/oci.h for functions...
> > Expecting parenth after identifier in `fd_set *__restrict __readfds'
> > after `fd_set *__restrict ' at /usr/lib/perl5/site_perl/5.6.1/C/Scan.pm line
> > 797.
> > h2xs failed at ./boot line 184
> >
> > problem?  I'm against the wall on this one, too.  Let me know if you've
> > figured anything out.
> 
> No, no joy on that yet, either, though apparently the 0.05 release is vapor at
> this point. Perhaps we'll get more info once life for Tim settles down in Eire.

I've got a new DBI release out and I'm working on DBD::Oracle now,
before Oracle::OCI because some of the build/link issues also affect
Oracle::OCI. I hope to get a DBD::Oracle release out in a day or so.
Then I hope to get an Oracle::OCI release out a day or two after that.

> I have a sneaking feeling that this is a C::Scan issue.

It is. As far as I can make out restrict is a new ANSI C9X standard
thingy and __restrict is an experimental version of the same.

Here's the patch that I think will workaround it:

diff -c -r1.7 h2xs
*** 1.7	2001/07/08 01:47:27
--- h2xs	2001/08/07 09:54:42
***************
*** 575,580 ****
--- 575,583 ----
  	'add_cppflags' => $addflags, 'c_styles' => [qw(C++ C9X)];
        $c->set('includeDirs' => [@dirs_h,"$Config::Config{archlib}/CORE"]);
  
+       # force addition of __restrict into keywords (asap)
+       $c->get('keywords')->{'__restrict'} = 1;
+ 
        push @$fdecls_parsed, @{ $c->get('parsed_fdecls') };
        push(@$fdecls, @{$c->get('fdecls')});

Let me know if that works for you. Thanks.

Tim.