Patch for DBI 1.34 Driver.xst - needed by DBD::Informix 2003.0x

---559023410-851401618-1046978164=:26439
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi,

I've had multiple reports of problems compiling DBD::Informix 2003.03.*
and 2003.04, on both Linux and Solaris, and the problem turns out to be
in the DBI 1.34 code in Driver.xst for handling data_sources (which is
still my fault - mostly).  Newer versions of GCC (eg 3.2.1 - as found on
my machine) are mostly C-99 compliant and accept variable declarations
part way through a block of code; older versions of GCC (eg 2.9x) do not
accept this, and neither do the Sun C Compilers.  And the generated code
for data_sources from Driver.xst as found in DBI 1.34 gets a variable
declared after some executable code (thanks to Boban for sending the
Informix.c file that demonstrated the problem).

    /* Example of the problem */
    int function(void)
    {
        int i;
        i = 3;
        int j = i + 1;  /* OK in GCC 3.2.1 and C-99 - and C++ */
        return (j);
    }

The attachment is a patch for Driver.xst from DBI 1.34.  It puts the
variable declarations at the start of a block (by introducing a new
block) and annotates why.

With luck, this means that DBD::Informix v2003.03.* and v2003.04 will
compile OK with the amended template file.

-- 
Jonathan Leffler                           #include <disclaimer.h>
STSM, Informix Database Engineering, IBM Data Management
Phone: +1 650-926-6921   Fax: +1 650-926-6971   Tie-line: 630-6921
Email: jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org
---559023410-851401618-1046978164=:26439
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="driver.xst.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.4.50.0303061116040.26439@anubis.menlo.ibm.com>
Content-Description: 
Content-Disposition: attachment; filename="driver.xst.patch"

LS0tIERyaXZlci54c3Qub2xkCTIwMDMtMDItMjYgMDk6NTY6MjkuMDAwMDAw
MDAwIC0wODAwDQorKysgRHJpdmVyLnhzdAkyMDAzLTAzLTA2IDExOjEwOjA5
LjU4Njg1NDAwMCAtMDgwMA0KQEAgLTUwLDIyICs1MCwyOSBAQA0KIA0KIHZv
aWQNCiBkYXRhX3NvdXJjZXMoZHJoLCBhdHRyID0gTnVsbHN2KQ0KLQlTViAq
ZHJoDQotCVNWICphdHRyDQotCVBQQ09ERToNCisgICAgU1YgKmRyaA0KKyAg
ICBTViAqYXR0cg0KKyAgICBQUENPREU6DQorICAgIHsNCisJLyoNCisJKiog
SkwgMjAwMy0wMy0wNjogVmFyaWFibGUgZGVjbGFyYXRpb25zIHBhcnQgd2F5
IHRocm91Z2ggYSBibG9jaw0KKwkqKiBub3QgYWNjZXB0ZWQgYnkgSVNPL0lF
QyA5ODk5OjE5OTAgY29tcGlsZXJzIC0gYSBwcm9ibGVtIHdpdGgNCisJKiog
b2xkZXIgdmVyc2lvbnMgb2YgR0NDIChlZyAyLjk3KSBvbiBMaW51eCBwbGF0
Zm9ybXMuDQorCSovDQogCURfaW1wX2RyaChkcmgpOw0KIAlBViAqYXY7DQog
CWF2ID0gZGJkX2RyX2RhdGFfc291cmNlcyhkcmgsIGltcF9kcmgsIGF0dHIp
Ow0KIAlpZiAoYXYpDQogCXsNCi0JCWludCBpOw0KLQkJaW50IG4gPSBBdkZJ
TEwoYXYpKzE7DQotCQlFWFRFTkQoc3AsIG4pOw0KLQkJZm9yIChpID0gMDsg
aSA8IG47ICsraSkNCi0JCXsNCi0JCQlQVVNIcyhBdkFSUkFZKGF2KVtpXSk7
DQotCQl9DQorCSAgICBpbnQgaTsNCisJICAgIGludCBuID0gQXZGSUxMKGF2
KSsxOw0KKwkgICAgRVhURU5EKHNwLCBuKTsNCisJICAgIGZvciAoaSA9IDA7
IGkgPCBuOyArK2kpDQorCSAgICB7DQorCQlQVVNIcyhBdkFSUkFZKGF2KVtp
XSk7DQorCSAgICB9DQogCX0NCisgICAgfQ0KIA0KICNlbmRpZg0KIA0K
---559023410-851401618-1046978164=:26439--
0
jleffler
3/6/2003 7:16:04 PM
perl.dbi.users 11073 articles. 1 followers. Follow

1 Replies
354 Views

Similar Articles

[PageSpeed] 35

Jeffrey-

the 
dbd-informix@us.ibm.com
address fails.  After applying your DBI 1.34 path, I can get 2003:04 to 
compile on Solaris.   Here's a recap (sorry for also posting to your human 
address) of ItWorks.  As noted below, Informix::TechSupport.pm uses a 
'connect_quietly' method, which isn't found.  I 'use'-ed TestHarness and 
changed it to "connect_to_test_database" and that works.  Did 
connect_quietly go away in 2003?

a

# DBI->connect('dbi:Informix:stores', '', '');
#  Connect Attribute: ChopBlanks => 1
<WORKING_VERSION VERSION="1.00">
    <DBD_INFORMIX>    2003.04 </DBD_INFORMIX>
    <DBI>             1.34                                         </DBI>
    <INFORMIX_ESQLC>  INFORMIX-ESQL Version 9.21.UUC1 </INFORMIX_ESQLC>
    <INFORMIX_SERVER> 7.31 (OnLine) </INFORMIX_SERVER>
    <PERL>            5.006001 i86pc-solaris dl_dlopen.xs          </PERL>
    <SYSTEM>          sunos wiwbei 5.7 generic_106542-15 i86pc i386 i86pc 
</SYSTEM>
    <SYS_COMPILER>    cc 2.95.3 20010315 (release) (gcc as 'cc') 
</SYS_COMPILER>
    <SYS_LOADER>      cc    (gcc as 'cc') </SYS_LOADER>
    <WHEN>            2003-03-08                                   </WHEN>
    <WHO>             Super-User <root@wiwbei.wiwb.circ7.dcn>      </WHO>
    <Z_NOTES>         Optional Notes 
Jeffrey-

the 
dbd-informix@us.ibm.com
address fails.  After applying your DBI 1.34 patch, it works!

In order to get ItWorks to work, I had to modify 
DBD::Informix::TechSupport to remove the (line 219)
my ($dbh) = &connect_quietly();

What I did was add:
use DBD::Informix::TestHarness;
to ItWorks and change the connect_quietly to:
my ($dbh) = &connect_to_test_database();
in TechSupport.pm

</Z_NOTES>
</WORKING_VERSION>

Thanks.

a


Andy Bach, Sys. Mangler
Internet: andy_bach@wiwb.uscourts.gov 
VOICE: (608) 261-5738  FAX 264-5030

"If you don't say anything, you won't be called on to repeat it" 
Calvin Coolidge
0
Andy_Bach
3/8/2003 8:44:16 PM
Reply:

Similar Artilces:

Patches for DBI v1.32
---559023410-851401618-1039913737=:6184 Content-Type: TEXT/PLAIN; charset=US-ASCII Dear Tim, Here's a new set of patches against the original DBI v1.32 for the files: Driver.xst dbd_xsh.h lib/DBI/DBD.pm The patches are gzipped. To apply them, use: gunzip DBI.patches.gz cd DBI-1.32 patch -p0 <../DBI.patches The DBD.pm file has undergone a whole lot more change -- it is, I think, in even better shape than the version shipped earlier. If you need them, I can redo the patches against that revised version of the file, but I'd rather no...

DBI 1.35 and greater break DBD-Informix 1.04 and 2003-04
Hi Jonathan, i tried to compile a Perl 5.8.0, DBI-1.37, DBD-Informix 2003-04 and Informix Client SDK 2.80FC2 on Solaris 9 with Sun Forte 7 Compiler. It's a 64 bit Database engine so i compiled it all with -xarch=v9. A simple script like #!/usr/bin/perl -w use DBD::Informix; my ($dsn) = "DBI:Informix:sysmaster\@dedev02"; my ($user_name) = ""; my ($password) = ""; my $dbh; my $sql; my $sth; #DBI->trace(9); $dbh=DBI->connect ("$dsn", "$user_name", "$password") or die "Couldn\'t conne...

DBI::Format in DBI-1.34 vs. DBI-Shell-11.91
There seem to be conflicting versions of DBI::Format in DBI-1.34 and DBI-Shell-11.91. After upgrading to the recent DBI-1.34 I again get a warning from the CPAN "r" command which reports that there is a more recent version of DBI::Format to be found in DBI-Shell-11.91.tar. When I read that the new DBI-1.34 removed the old DBI::Shell from distribution, I was surporised that it kept DBI::Format. I couldn't find any perl references in DBI-1.34 that refered to DBI::Format, so perhaps if the official DBI::Format is being kept up to date in DBI-Shell-11.91, you could ...

Errors in DBD-Oracle 1.12 using DBI 1.26, OK with DBI 1.25
Platform: Windows 2000 Perl: ActiveState Perl 5.6.1 build 629 ---------------------------------------------------------------------------- ---- USING DBI 1.25 ---------------------------------------------------------------------------- ---- C:\temp\DBD-Oracle-1.12>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. C:\bin\Perl\bin\Perl.exe -Mblib -IC:\bin\Perl\lib -IC:\bin\Perl\lib -e " use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;" t\bas...

DBI-1.21 DBI.xs patch
--------------ms10979709E84C5FA689C39B1B Content-Type: multipart/mixed; boundary="------------EF8C4696EAE17FB10D560866" This is a multi-part message in MIME format. --------------EF8C4696EAE17FB10D560866 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Dear Tim, I receive the error "Can't read $DBI::err, last handle unknown or destroyed during global destruction" many times (and for $DBI::errstr too). I'm not able to say what is the reason of these errors. Setting the trace levelel to 10 didn't help, and trace files w...

DBI Driver.xst and DBD::cego
Hi! I try to maintain the FreeBSD port databases/p5-DBD-cego, and it has a problem if I compile it with clang. http://www.freebsd.org/cgi/query-pr.cgi?pr=178755 I investigated and I think it is caused by issues in DBI, more exactly, issues in Driver.xst ? I made a first try on a fix in March, and a second one today: https://rt.cpan.org/Ticket/Display.html?id=84285 Can someone have a look at it ? Is that patch the right way to do it ? -- pi@opsec.eu +49 171 3101372 7 years to go ! Hi Kurt. On Sun, May 26, 2013 at 08:13:58PM +0200, K...

sv_undef in DBI 1.30 Driver.xst?
Tim, I note that Driver.xst contains references to sv_undef rather than PL_sv_undef. The ipport.h file arranges to map PL_sv_undef to sv_undef for Perl 4. Is there any reason not to replace the references to sv_undef in Driver.xst with references to PL_sv_undef? -- Jonathan Leffler #include <disclaimer.h> STSM, Informix Database Engineering, IBM Data Management Solutions Phone: +1 650-926-6921 Tie-line: 630-6921 Email: jleffler@us.ibm.com (RIP jleffler@informix.com) Notes ID: Jonathan Leffler/Menlo Park/IBM@IBMUS Guardi...

DBI 1.15
Hi, I just upgraded from DBI 1.14 to 1.15. After the install completed, I ran a check on what else needed to be upgraded, the CPAN module reports that DBD::ADO module needs to be upgraded from the current 0.419 to version 1.17 as found in DBI 1.14. Why did the version regress? Let's take a look at the code for blib/DBD/ADO.pm in DBI 1.15 and 1.14: Anubis JL: pwd /work/jleffler/.cpan/build/DBI-1.15 Anubis JL: grep '$VERSION =' lib/DBD/ADO.pm $VERSION = '0.4'.sprintf("%02d",substr(q$Revision: 1.19 $, 12,-1)); Anubis JL: cd /work2/DBD-Informix/...

DBI V 1.39, DBD::mysql V 2.9002, and DBI->data_sources()
Hi Folks 1) Under 'synopsis', it says: @data_sources =3D DBI->data_sources($driver_name, \%attr, $dbh); however that combination of options is not listed under the discussion of= data_sources(). Anyway, I tried DBI -> data_sources('mysql') and got an empty list. Sigh. I tried DBI -> data_sources('mysql', {}, $dbh) and got: Undefined subroutine &DBD::mysql::db::SQL_VARCHAR called at= C:/Perl/site/lib//DBD/mysql.pm line 337. 2) Under 'data_sources', it says: A $dbh can also be used as the $driver argument. I tried DBI -> data_sou...

DBI w/ DBD:ODBC or DBI w/ DBD:mysql Which?
------=_NextPart_000_0009_01C1D022.ADFABA00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am new to Perl DBI programming But it is fairly simple.. I am using both Mysql 3.23.44nt and 3.23.43 Linux..as well as PostgreSQL 7.1 Linux and on WinXP on Cygwin. Perl on Linux was straight forward but the Perl on WIn is a bit = Different. I ran a simple script to insert records in a table as test and it worked = but I am unsure that the WinXP install of Perl and DBI is correct that is do I = have the=20 correct modules in place. ...

Problem with DBI-1.20 vs. DBI-1.19
I've found a reproducible failure that occurs in DBI-1.20 that does not occur in DBI-1.19. Using the DBD::mysql backend, by the way, and observed using both mysql-3.23.37 and mysql-3.23.46 (it's not asked about in the bug report format). Apologies if yahoo mail mangled the newlines. OK here's the bug report: HERE is a script, intended to be saved as 'showbug.pl', that shows the problem under 1.20 but not under 1.19. After the __END__ of the script is the database schema for the test 'jl1' database (that's jay-el-one, for those with am...

[PATCH DBI] RE: [BUG] DBI 1.20, bleadperl and 64 bit ints not mixing too well
Tim The attached patch corrects various pointer cast, printf format and "computed value not used" warning from DBI; which I found following up the following messages. I was using perl-5.7.2@11938, configured with -Duse64bitint. My solution to the setlinebuf warning was to delete all the PerlIO definitions, perhaps not the best solution. Robin > From perl5-porters-return-43379-rmb1=cise.npl.co.uk@perl.org Sat Sep 8 09:50:45 2001 > Mailing-List: contact perl5-porters-help@perl.org; run by ezmlm > Precedence: bulk > list-help: <mailto:perl5-porters-h...

[perl5-dbi/dbi] 7c2a83: DBI-1.632 was released without the TYPE stuff
----==_mimepart_54676ba37c070_5ecf3fdf911ed2b87935 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Branch: refs/heads/dbd-file-TYPE Home: https://github.com/perl5-dbi/dbi Commit: 7c2a8350d205604ca51f90ca7e440e1f8ef31310 https://github.com/perl5-dbi/dbi/commit/7c2a8350d205604ca51f90ca7e440e1f8ef31310 Author: H.Merijn Brand - Tux <h.m.brand@xs4all.nl> Date: 2014-11-15 (Sat, 15 Nov 2014) Changed paths: M Changes M lib/DBD/File.pm Log Message: ----------- DBI-1.632 was released without the TYPE stuff ---...

DBI 1.38: Undefined subroutine &DBD::_::db::croak called at DBI.pm line 1496
--------------043611293F9F9B63EB9B52C5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Tim, the attached patch adds 'Carp::' to all unqualified calls to carp() and croak(). You'll get the error message above with something like perl -MDBI -e 'DBI->connect()->primary_key($c,$s,$t)' Steffen --------------043611293F9F9B63EB9B52C5 Content-Type: text/plain; charset=us-ascii; name="DBI.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="DBI.diff" *** DBI.orig Fri Aug 22 23:...

Announce: DBI-1.57 RC2 (aka DBI-1.56_92)
file: $CPAN/authors/id/T/TI/TIMB/DBI-1.56_92.tar.gz size: 489501 bytes md5: 0a690df4e157ce8de4862bc019d3c9f6 Just uploaded. You should be able to get it from here soon if your mirror doesn't have it: ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/Tim_Bunce/DBI-1.56_91.tar.gz As usual, I'd appreciate any and all testing you can do. Thanks! Tim. ------=_NextPart_000_EC11_01C7AF5D.E51868F0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit testing with ftp://ftp.funet.fi...

Web resources about - Patch for DBI 1.34 Driver.xst - needed by DBD::Informix 2003.0x - perl.dbi.users

Resources last updated: 1/2/2016 9:07:07 AM