delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/10/10:07:41

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <779F20BCCE5AD31186A50008C75D997917176B@silldn_mail1.sanwaint.com>
From: "Fifer, Eric" <EFifer AT sanwaint DOT com>
To: cygwin AT sourceware DOT cygnus DOT com
Cc: "'dbi-users AT fugue DOT com'" <dbi-users AT fugue DOT com>,
"'jurlwin AT bellatlantic DOT net'" <jurlwin AT bellatlantic DOT net>
Subject: RE: libodbccp32.a
Date: Thu, 10 Aug 2000 15:05:39 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Note-from-DJ: This may be spam

------_=_NextPart_000_01C002D4.2A437E44
Content-Type: text/plain;
	charset="iso-8859-1"


With the Cygwin Perl port I always find the #define WIN32
that comes from <windows.h> is always getting in the way
when porting/building Win32ish CPAN modules like DBD::ODBC
or Win32::OLE.

WIN32 is used by Perl for the native Win32 port, and
affects a lot of things, including the failure that
occurs with #include "win32.h".

Anyway, a #undef WIN32 shortly after the #include <windows.h>
usually does the trick.

In the case of DBD::ODBC the attached patch cleans up some
typos, removes the unnecessary -lodbccp32, adds #undef WIN32
and removes some obsolete stuff (including the README.cygwin).

It now builds cleanly and passes all tests.

Regards,

Eric Fifer



------_=_NextPart_000_01C002D4.2A437E44
Content-Type: application/octet-stream;
	name="DBD-ODBC.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="DBD-ODBC.patch"

diff -urN DBD-ODBC-0.28.orig/MANIFEST DBD-ODBC-0.28/MANIFEST=0A=
--- DBD-ODBC-0.28.orig/MANIFEST	Thu Mar  9 03:45:03 2000=0A=
+++ DBD-ODBC-0.28/MANIFEST	Thu Aug 10 14:03:09 2000=0A=
@@ -3,7 +3,6 @@=0A=
 Makefile.PL=0A=
 README=0A=
 README.adabas=0A=
-README.cygwin=0A=
 ODBC.h=0A=
 ODBC.pm=0A=
 ODBC.xs=0A=
diff -urN DBD-ODBC-0.28.orig/Makefile.PL DBD-ODBC-0.28/Makefile.PL=0A=
--- DBD-ODBC-0.28.orig/Makefile.PL	Thu Mar  9 03:45:03 2000=0A=
+++ DBD-ODBC-0.28/Makefile.PL	Thu Aug 10 14:05:51 2000=0A=
@@ -74,7 +74,7 @@=0A=
     my $odbchome=3D $::opt_o || $ENV{ODBCHOME};=0A=
 =0A=
     # per patches from Teun Burgers=0A=
-    if (!$odbchome && $ENV{WINDIR} && $^O =3D~ /^cygwin/) {=0A=
+    if (!$odbchome && $ENV{WINDIR} && $^O eq 'cygwin') {=0A=
 	my $tmp_odbchome =3D $ENV{WINDIR};=0A=
 	$tmp_odbchome =3D~ s/^([A-Za-z]):*$/\/\/$1/;=0A=
 	$tmp_odbchome =3D~ s/\\/\//g;=0A=
@@ -108,7 +108,7 @@=0A=
 =0A=
     my $myodbc =3D'';	# edit and hack to suit!=0A=
 =0A=
-    $myodbc =3D 'MicroSoft ODBC'=0A=
+    $myodbc =3D 'Microsoft ODBC'=0A=
                  if (    -e "$odbchome/system/odbc32.dll" or=0A=
 			 -e "$odbchome/system32/odbc32.dll" or=0A=
                          -e "$odbchome/odbc32.dll");=0A=
@@ -142,14 +142,16 @@=0A=
 =0A=
     warn "\nUmm, this looks like a $myodbc type of driver =
manager.\n";=0A=
 =0A=
-    if ($myodbc =3D~ /^MicroSoft ODBC/) {=0A=
-	print "\nBuilding for MicroSoft under CygWin32\n";=0A=
-	$opts{LIBS} =3D "-lodbc32 -lodbccp32";=0A=
+    if ($myodbc eq 'Microsoft ODBC') {=0A=
+	print "\nBuilding for Microsoft under Cygwin\n";=0A=
+	$opts{LIBS} =3D "-lodbc32";=0A=
+        print SQLH "#include <windows.h>\n";=0A=
         print SQLH "#include <sql.h>\n";=0A=
         print SQLH "#include <sqlext.h>\n";=0A=
-        $opts{dynamic_lib} =3D {OTHERLDFLAGS =3D> "-lodbc32 =
-lodbccp32"};=0A=
+        print SQLH "#undef WIN32\n";=0A=
+        $opts{dynamic_lib} =3D {OTHERLDFLAGS =3D> "-lodbc32"};=0A=
     }=0A=
-    if ($myodbc eq 'iodbc') {=0A=
+    elsif ($myodbc eq 'iodbc') {=0A=
 	my $ilibdir =3D "$odbchome/lib"; =0A=
 	my @ilibs =3D <$ilibdir/*iodbc*.*>;=0A=
 	@ilibs =3D grep { /\.($Config{so}|$Config{dlext}|a)$/ } @ilibs;=0A=
@@ -214,7 +216,7 @@=0A=
 	@ilibs =3D grep { /\.($Config{so}|$Config{dlext}|a)$/ } @ilibs;=0A=
 	die "That's odd, I can't see any esoobclient libs in $odbchome" =
unless @ilibs;=0A=
 	print "We expect to find the sql.h and sqlext.h files (which =
were\n";=0A=
-	print "supplied with esoobclient) in \$ODBCHOME\include directory =
alongside\n";=0A=
+	print "supplied with esoobclient) in \$ODBCHOME/include directory =
alongside\n";=0A=
 	print "the @ilibs library.\n\n";=0A=
 	my $ilibpath =3D $ilibs[0]; # XXX if both .so and .a, pick based on =
LINKTYPE?=0A=
 	my $ilibname =3D basename($ilibpath);=0A=
diff -urN DBD-ODBC-0.28.orig/README.cygwin =
DBD-ODBC-0.28/README.cygwin=0A=
--- DBD-ODBC-0.28.orig/README.cygwin	Thu Mar  9 03:45:04 2000=0A=
+++ DBD-ODBC-0.28/README.cygwin	Thu Jan  1 00:00:00 1970=0A=
@@ -1,61 +0,0 @@=0A=
-=3Dhead1 Introduction
-
-This document describes how to build DBD::ODBC
-for perl ported to the cygwin platform.
-
-=3Dhead1 Prerequisites
-
-To build DBD::ODBC you need the following in
-order of installation:
-
-=3Dover 4
-
-=3Ditem The cygwin tools
-
-The cygwin tools provide a unix environment on top
-of windows 95 en windows NT. It include a port of
-gcc and the main unix program development tools.
-The most recent cygwin version (currently B20.1)
-is available at http://sourceware.cygnus.com/cygwin/
-
-=3Ditem perl 5.00503
-
-Perl 5.00503 does not compile out of the box for cygwin. There is
-a good binary distribution however of perl 5.00503 for cygwin B20.1
-at http://cygutils.netpedia.net/. This port has the ability to build
-dynamic extensions.
-
-=3Ditem Windows ODBC headers and import libraries
-
-A rather complete set of headers and import libraries for windows
-including those for ODBC by Anders Norlander can be found at
-http://www.acc.umu.se/~anorland/gnu-win32/ I used version 0.1.5.
-
-=3Ditem DBI-1.12 or later from CPAN.
-
-DBI will build out of the box. Compilation does yield harmless =
messages
-of incompatible compiler versions. Testing will yield taint errors in
-Cwd.pm called from F<t/examp.t>. F<t/examp.t> must be run with -T =
unset.
-
-=3Ditem This module (DBD::ODBC)
-
-Install as in README. Again compilation will yield harmless messages =
of
-incompatible compiler versions.  After configuring a suitable =
datasource
-in 32-bit ODBC from your configuration screen, make test should pass
-all tests succesfully. I use it for MS Access 97 databases and
-sofar this works fine.
-
-=3Dback
-
-=3Dhead1 TODO
-
-Make both DBI and DBD::ODBC compile cleanly and
-make DBI pass all test cleanly on this platform.
-
-=3Dhead1 COLOFON
-
- Author: Teun Burgers
- E-mail: burgers AT ecn DOT nl
- Date:   15-07-1999
-
-=3Dcut


------_=_NextPart_000_01C002D4.2A437E44
Content-Type: text/plain; charset=us-ascii

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
------_=_NextPart_000_01C002D4.2A437E44--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019