On Sat, 24 Oct 2009 11:19:00 +0100, "Martin J. Evans"
<martin.ev...@easysoft.com> wrote:

> H.Merijn Brand wrote:
> > On Fri, 23 Oct 2009 20:10:29 +0100, "Martin J. Evans"
> > <martin.ev...@easysoft.com> wrote:
> > 
> >> I noticed DBI was upgraded in subversion to the latest ppport.h (in
> >> dbipport.h) and the recommendations that ppport.h has made.
> > 
> > :)
> > 
> >> dbipport.h seems to be ppport.h from Devel::PPPort.
> > 
> > Correct
> > 
> >> The DBI::DBD docs say to copy dbivport.h from the latest DBI
> >> distribution to your DBD distribution - which I have done again - I am
> >> happy with this and understand it.
> > 
> > Good
> > 
> >> I have implemented the recommendations that "perl ppport.h dbdimp.c" has
> >> made in DBD::ODBC.
> > 
> > \o/
> > 
> >> However, "perl ppport.h dbdimp.c" for DBD::ODBC suggests adding ppport.h
> >> to DBD::ODBC's dbdimp.c and including it in the DBD::ODBC distribution.
> > 
> > Remove that line. You need only one!
> > 
> >> I cannot do that since I'll get dbipport.h and ppport.h and
> >> redeclarations of macros.
> > 
> > Correct. The recommendation is such, that to keep as close to the
> > actual DBI, compiler with the ppport.h that was shipped with DBI.
> > 
> > In theory it should not matter, but we want to be sure.
> > 
> > Another reason to ship dbipport.h, is that it is likely to be more
> > recent than the one shipped with perl itself.
> > 
> >> I may be missing something but I don't understand why DBI includes
> >> ppport.h as dbipport.h since it stops me including a newer version of
> >> pport.h. I expected the way this would work is that when building DBI,
> >> you'd get DBI's copy of ppport.h but when building a DBD::* you'd get
> >> DBD::*'s copy of ppport.h.
> >>
> >> What to do?
> > 
> > Use DBI's version, but using a *recent* version of Devel::PPPort is
> > fine too. I intend to keep ppport.h in DBI `recent' as long as Tim
> > permits me to
> 
> I don't get "but using a *recent* version of Devel::PPPort is fine too".
> How can you do this? DBIXS.h does
> 
> #include "dbipport.h"

I'll contact the author of Devel::PPPort and askfor a more permanent
solution

> so the one I have in /usr/local/lib/perl/5.8.8/auto/DBI/dbipport.h is
> always picked up even if I put my own copy of ppport.h as dbipport.h in
> DBD::ODBC distribution. It would have to be:
> 
> #include <dbipport.h>
> 
> to pick up a local one first.
> 
> So as it stands, if I analyze my dbdimp.c with the latest Devel::PPPort
> and made changes using new macros then someone attempts to install
> DBD::ODBC with an old DBI (with an older ppport.h missing the new macro
> I have used) they may get undefined macros. i.e., there does not seem to
> be a way for me to override dbipport.h with a newer one.

-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/

Reply via email to