This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[ANN] static Perl5.005_03 with DBI, mSQL modules


Yes, it's true - I finally figured out what was wrong with the Perl DBI
module. Since so many folks asked for DBI, I've updated my binary
distribution to include the following modules (statically linked):

DBI-1.07
Msql-Mysql-modules-1.2017  (mSQL *only*)
Data-ShowTable-3.3 (needed for Msql module)
String-CRC-1.0 (I used it to test, and I'm too lazy to back it out)

The binary is available at
ftp://belgarion.resnet.gatech.edu/pub/cygwin/B20/perl/perl5.005_03-cygwinb20.tar.bz2

The old version, without the added modules, has been renamed to
ftp://belgarion.resnet.gatech.edu/pub/cygwin/B20/perl/perl5.005_03-cygwinb20-old.tar.bz2

The sourcecode for the modules, along with the requisite patches, can be
found in
ftp://belgarion.resnet.gatech.edu/pub/cygwin/B20/perl/modules

Please take a look at the porting notes below. A few of the things I did
to get this to compile seem a bit flaky to me, but it works. If you've
got a comment, or a suggestion for a better way to do get DBI et al to
compile, please let me know.

Happy Perl-ing!
Chuck Wilson


**** Porting notes ****

***************
***** DBI *****
***************

In order to get DBI to build, I had to apply the following trivial
patch. There exists a variable "debug" in the main Perl source tree. The
impure pointer hack that somebody came up with in order to get Perl to
build under Cygwin redefines that name to mean (*__imp_debug). Now, this
works fine for modules that want to access that variable, unless the
module contains its own private variable names "debug." The preprocessor
doesn't know to replace only certain "debug's" with *__imp_debug -- it
redefines them all, and the build fails.

DBI has its own private debug variable, so to prevent the redefinition,
we #undef debug.

diff -urN DBI-1.07-orig/DBIXS.h DBI-1.07/DBIXS.h
--- DBI-1.07-orig/DBIXS.h Thu May 06 13:48:46 1999
+++ DBI-1.07/DBIXS.h Tue May 11 01:33:25 1999
@@ -24,6 +24,11 @@
 #define dTHR typedef int _thr_DBI_dummy
 #endif

+#if defined(__CYGWIN__) || defined(__CYGWIN32__)
+#ifdef debug
+#undef debug
+#endif
+#endif

 /* DBI SQL_* type definitions */
 #include "dbi_sql.h"

****************
***** mSQL *****
****************

I built this module against the Cygwin Porting Project's distribution of
mSQL. However, there was a definition conflict:

/usr/local/Hughes/include/common/portability.h defined ssize_t as an
int, while /usr/i586-cygwin32/include/sys/types.h defined ssize_t as a
long. I applied the following patch to the mSQL distribution, to bring
it in line with cygwin. I'm not sure what the effect of this is on the
stability of the code, since (obviously) mSQL itself was compiled with
ssize_t == int, but now DBD::mSQL is compiled with ssize_t == long. It
compiled and passed the tests, so....

--- Hughes-orig/include/common/portability.h Sat Dec 05 09:08:22 1998
+++ Hughes/include/common/portability.h Tue May 11 04:00:08 1999
@@ -58,7 +58,7 @@
 #endif

 #ifndef HAVE_SSIZE_T
- typedef int   ssize_t;
+ typedef long   ssize_t;
 #endif










--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]