delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/10/00:42:45

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: <39920F3D.8BBB5C8F@ece.gatech.edu>
Date: Wed, 09 Aug 2000 22:11:09 -0400
From: "Charles S. Wilson" <cwilson AT ece DOT gatech DOT edu>
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: corrosion AT connect DOT to
CC: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: libodbccp32.a
References: <F184jsX3Ra5cNtukGYk00000f5b AT hotmail DOT com>

Neil Lunn wrote:
> 
> >#ifdef WIN32
> >#  include "win32.h"
> >#endif
> >
> >That's "win32.h", not <win32.h>.  There's a file in
> ><perl-src>/win32/win32.h, which is probably copied up to the toplevel
> >during a win32-native configure. (I'm just guessing here)
> 
> That's about right!
> 
> >
> >The correct fix is probably to replace the #ifdef statement with:
> >
> >#if defined(WIN32) && !defined(__CYGWIN__)
> >
> 
> Agreed! or should win32.h copy in the perl build on cygwin? (read on)

No, I don't think so.

> 
> >But the presence of that #include "win32.h" has never cause me any build
> >trouble; it's odd that it would only cause difficulties when building
> >DBD::ODBC but not other modules.
> >
> Bit of a guess, isn't this a perl guts thing when creating the bootstrap for
> the module?
> 
> The typedefs in sqltype.h require windows.h so this include needs to be
> added to build of DBD::ODBC (Thus in Makefile.PL). Remembering this is the
> windows native ODBC driver manager being used and not a cygwin native.
> 

But windows.h is already included:

    if ($myodbc =~ /^MicroSoft ODBC/) {
        print "\nBuilding for MicroSoft under CygWin32\n";
        $opts{LIBS} = "";
        print SQLH "#include <windows.h>\n";
        print SQLH "#include <sql.h>\n";
        print SQLH "#include <sqlext.h>\n";
        $opts{dynamic_lib} = {OTHERLDFLAGS => "-lodbc32"};
    }

Do you get the "Building for MicroSoft under CygWin32" message when
doing "perl Makefile.PL" ?

> Thus #ifdef WIN32 get's true. Unless there's another way to do it!

Sure. This is a major hack, but it ought to work:

--- Makefile.PL.orig    Wed Aug  9 21:56:26 2000
+++ Makefile.PL Wed Aug  9 21:57:44 2000
@@ -79,6 +79,7 @@
        $tmp_odbchome =~ s/^([A-Za-z]):*$/\/\/$1/;
        $tmp_odbchome =~ s/\\/\//g;
        $odbchome = $tmp_odbchome if (-e "$tmp_odbchome/odbc.ini")
+       $opts{DEFINE} = "-mno-win32";
     }
 
     unless ($odbchome) {

Alternatively, you could say "-U_WIN32 -UWINNT" instead of "-mno-win32".

--Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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