From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110451 invoked by alias); 30 Mar 2019 08:11:54 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 110240 invoked by uid 89); 30 Mar 2019 08:11:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_20,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS,URIBL_BLOCKED autolearn=ham version=3.3.1 spammy=Wagner, wagner, RELEASE, *xs X-HELO: mx009.vodafonemail.xion.oxcs.net Received: from mx009.vodafonemail.xion.oxcs.net (HELO mx009.vodafonemail.xion.oxcs.net) (153.92.174.39) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 30 Mar 2019 08:11:44 +0000 Received: from vsmx002.vodafonemail.xion.oxcs.net (unknown [192.168.75.192]) by mta-6-out.mta.xion.oxcs.net (Postfix) with ESMTP id 47E46D9B0DF for ; Sat, 30 Mar 2019 08:11:41 +0000 (UTC) Received: from Rainer.invalid (unknown [87.185.211.111]) by mta-6-out.mta.xion.oxcs.net (Postfix) with ESMTPA id 1E26D199C45 for ; Sat, 30 Mar 2019 08:11:38 +0000 (UTC) From: Achim Gratz To: cygwin@cygwin.com Subject: Re: Compile perl Win32::OLE module References: <76301648869dbc361e8503e8ada2de43@plebeian.com> Date: Sat, 30 Mar 2019 08:11:00 -0000 In-Reply-To: <76301648869dbc361e8503e8ada2de43@plebeian.com> (Chris Wagner's message of "Fri, 29 Mar 2019 18:21:28 -0400") Message-ID: <87d0m893yl.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-03/txt/msg00680.txt.bz2 Chris Wagner writes: > --- OLE.xs.bak 2019-03-29 16:29:52.225925700 -0400 > +++ OLE.xs 2019-03-29 16:35:28.756575400 -0400 > @@ -480,7 +480,7 @@ > > /* Check against local computer name (from registry) */ > if (GetComputerNameA(szComputerName, &dwSize) > - && stricmp(pszName, szComputerName) == 0) > + /* for a hostname up to 1024 characters */ > + && strncmp(pszName, szComputerName, 1024) == 0) > { > return TRUE; > } The canonical replacement for stricmp is strcasecmp on POSIX systems. While that lets the XS module compile provided you ignore some of the many warnings that are usually treated as errors (which in turn requires that you modify the generated Makefile since the default options MakeMaker uses come from the immutable %Config::Config hash), it is unlikely to work at 64bit. The two errors that make it fail are easily fixed, though, but you still might have to remove the stack protector. I no longer have the necessary program versions to test it, but last I did it was limping along on Win7 in combination with a 32bit Cygwin install. The module is effectively dead upstream, so there's not much point in trying to use it. perl-Win32-OLE.cygport: --8<---------------cut here---------------start------------->8--- NAME="perl-Win32-OLE" VERSION="0.1712" RELEASE="1" CPAN_AUTHOR="JDB" DESCRIPTION="Perl distribution Win32-OLE, providing Perl modules: OLE OLE::Tie OLE::Variant Win32::OLE Win32::OLE::Const Win32::OLE::Enum Win32::OLE::NLS Win32::OLE::Tie Win32::OLE::TypeInfo Win32::OLE::Variant. OLE Automation extensions." DIFF_EXCLUDES="MYMETA.*" NO_PERL_DEPS=1 inherit perl --8<---------------cut here---------------end--------------->8--- perl-Win32-OLE.src.patch: --8<---------------cut here---------------start------------->8--- --- origsrc/Win32-OLE-0.1712/Makefile.PL 2013-12-11 23:25:13.000000000 +0100 +++ src/Win32-OLE-0.1712/Makefile.PL 2019-03-30 08:56:28.164392300 +0100 @@ -29,7 +33,7 @@ WriteMakefile(%param); sub MY::xs_c { ' .xs.cpp: - $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp + $(PERL) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp '; } --- origsrc/Win32-OLE-0.1712/OLE.xs 2014-05-15 00:34:17.000000000 +0200 +++ src/Win32-OLE-0.1712/OLE.xs 2019-03-30 09:05:23.035589100 +0100 @@ -480,7 +480,7 @@ IsLocalMachine(pTHX_ SV *host) /* Check against local computer name (from registry) */ if (GetComputerNameA(szComputerName, &dwSize) - && stricmp(pszName, szComputerName) == 0) + && strcasecmp(pszName, szComputerName) == 0) { return TRUE; } @@ -922,12 +922,12 @@ ReportOleError(pTHX_ HV *stash, HRESULT if (warnlvl < 3) { cv = perl_get_cv("Carp::carp", FALSE); if (!cv) - warn(SvPVX(sv)); + warn("%s", SvPVX(sv)); } else { cv = perl_get_cv("Carp::croak", FALSE); if (!cv) - croak(SvPVX(sv)); + croak("%s", SvPVX(sv)); } } --8<---------------cut here---------------end--------------->8--- Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple