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"

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.

Martin

Reply via email to