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

Charles Wilson cwilson@ece.gatech.edu
Tue May 11 02:43:00 GMT 1999

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):

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

The old version, without the added modules, has been renamed to

The sourcecode for the modules, along with the requisite patches, can be
found in

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

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

 /* 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 @@

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

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

More information about the Cygwin mailing list