develooper Front page | | Postings from October 2010

Problems with ppport.h and dbipport.h

Thread Next
Martin J. Evans
October 22, 2010 11:00
Problems with ppport.h and dbipport.h
Message ID:
I've released a DBD::ODBC requiring Perl 5.8 but included the use of 
my_snprintf (from ppport.h) which unfortunately was not defined until 
5.9.4. Fair enough, my fault but I have no way of fixing it (other than 
reversing my_snprintf back to sprintf) because of the way DBI includes 
dbipport.h (alias ppport.h).

In DBI, dbipport.h is a renamed ppport.h generated by Devel::PPPort and 
is included from DBIXS.h which all DBDs include - presumably the idea 
was to save DBDs from having to keep up to date with ppport.h. In DBI 
1.609, dbipport.h was updated (by H Merijn Brand I think) to the latest 
Devel::PPPort 3.19 version but I'm not convinced dbipport.h is always 
kept in sync with ppport.h. However, because DBIXS.h includes dbipport.h 
as #include "dbipport.h" I cannot override DBI's copy with a newer 
version in DBD::ODBC and hence I cannot fix my my_snprintf issue the way 
I'd like which is to include with DBD::ODBC a newer ppport.h as dbipport.h.

In the case reported to me the user has an old DBI pre 1.609 which has a 
massively out of date ppport.h and he cannot upgrade DBI but he cannot 
install the latest DBD::ODBC. If that #include "dbipport.h" was changed 
to #include <dbipport.h> I could at least release a DBD::ODBC including 
the latest ppport.h as dbipport.h and the problem is fixed. I know this 
won't help today but if this had been done in the past I would at least 
have had the option to fix it locally in DBD::ODBC today.

As a result, I'd like to change that include in DBIXS.h to add this 
flexibility in the future.

Any objections?


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About