[PATCH] Move Win32 from win32/ext/Win32 to ext/Win32

To compile the Win32 module under both "MSWin32" and "cygwin" the module
needs to be moved to the ext/ subdirectory.  To preserve the change history
this should be done with `p4 integrate`:

    p4 integrate win32/ext/Win32/... ext/Win32/...
    p4 delete win32/ext/Win32/... 

The attached patch then updates Configure to build the module under cygwin
only, and updates the MANIFEST.  The MSWin32 builds will continue to find
the module automatically using the FindExt.pm module.

Cheers,
-Jan


diff -dur bleadperl/Configure bleadnew/Configure
--- bleadperl/Configure	Tue Dec 05 06:55:50 2006
+++ bleadnew/Configure	Tue Dec 05 13:50:21 2006
@@ -21090,6 +21090,11 @@
                         esac
 		esac
 		;;
+	Win32)
+		case "$osname" in
+		cygwin) avail_ext="$avail_ext $xxx" ;;
+		esac
+		;;
 	XS/APItest|xs/apitest)
 		# This is just for testing.  Skip it unless we have dynamic loading.
 
diff -dur bleadperl/MANIFEST bleadnew/MANIFEST
--- bleadperl/MANIFEST	Mon Dec 04 07:42:49 2006
+++ bleadnew/MANIFEST	Tue Dec 05 13:47:01 2006
@@ -1207,6 +1207,9 @@
 ext/Unicode/Normalize/t/test.t	Unicode::Normalize
 ext/Unicode/Normalize/t/tie.t	Unicode::Normalize
 ext/util/make_ext		Used by Makefile to execute extension Makefiles
+ext/Win32/Makefile.PL		Win32 extension makefile writer
+ext/Win32/Win32.pm		Win32 extension Perl module
+ext/Win32/Win32.xs		Win32 extension external subroutines
 ext/XS/APItest/APItest.pm	XS::APItest extension
 ext/XS/APItest/APItest.xs	XS::APItest extension
 ext/XS/APItest/core.c		Test API functions when PERL_CORE is defined
@@ -3798,9 +3801,6 @@
 win32/ext/Win32API/File/t/file.t			See if Win32API::File extension works
 win32/ext/Win32API/File/t/tie.t				See if Win32API::File extension works
 win32/ext/Win32API/File/typemap				Win32API::File extension interface types
-win32/ext/Win32/Makefile.PL	Win32 extension makefile writer
-win32/ext/Win32/Win32.pm	Win32 extension Perl module
-win32/ext/Win32/Win32.xs	Win32 extension external subroutines
 win32/fcrypt.c			crypt() implementation
 win32/FindExt.pm		Scan for extensions
 win32/genmk95.pl		Perl code to generate command.com-usable makefile.95
End of Patch.
0
jand
12/7/2006 12:31:42 AM
perl.perl5.porters 47261 articles. 0 followers. Follow

11 Replies
671 Views

Similar Articles

[PageSpeed] 43

SmFuIER1Ym9pcyB3cm90ZToKPiBUbyBjb21waWxlIHRoZSBXaW4zMiBtb2R1bGUgdW5kZXIgYm90
aCAiTVNXaW4zMiIgYW5kICJjeWd3aW4iIHRoZSBtb2R1bGUKPiBuZWVkcyB0byBiZSBtb3ZlZCB0
byB0aGUgZXh0LyBzdWJkaXJlY3RvcnkuICBUbyBwcmVzZXJ2ZSB0aGUgY2hhbmdlIGhpc3RvcnkK
PiB0aGlzIHNob3VsZCBiZSBkb25lIHdpdGggYHA0IGludGVncmF0ZWA6Cj4gCj4gICAgIHA0IGlu
dGVncmF0ZSB3aW4zMi9leHQvV2luMzIvLi4uIGV4dC9XaW4zMi8uLi4KPiAgICAgcDQgZGVsZXRl
IHdpbjMyL2V4dC9XaW4zMi8uLi4gCj4gCj4gVGhlIGF0dGFjaGVkIHBhdGNoIHRoZW4gdXBkYXRl
cyBDb25maWd1cmUgdG8gYnVpbGQgdGhlIG1vZHVsZSB1bmRlciBjeWd3aW4KPiBvbmx5LCBhbmQg
dXBkYXRlcyB0aGUgTUFOSUZFU1QuICBUaGUgTVNXaW4zMiBidWlsZHMgd2lsbCBjb250aW51ZSB0
byBmaW5kCj4gdGhlIG1vZHVsZSBhdXRvbWF0aWNhbGx5IHVzaW5nIHRoZSBGaW5kRXh0LnBtIG1v
ZHVsZS4KClRoYW5rcywgYXBwbGllZCBhcyAjMjk0ODMuCgpJcyBpdCB3b3J0aCBkb2luZyBsaWtl
d2lzZSB3aXRoIHdpbjMyL2V4dC9XaW4zMkFQSS9GaWxlID8gSSd2ZSBubyBpZGVhIAp3aGV0aGVy
IHRoYXQgd29ya3MgdW5kZXIgQ3lnd2luIG9yIG5vdC4KCi0tIAoKCi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AM
On Thu, 07 Dec 2006 09:14:43 +0000, Steve Hay <steve.hay@uk.radan.com> wrote:

> Jan Dubois wrote:
> > To compile the Win32 module under both "MSWin32" and "cygwin" the module
> > needs to be moved to the ext/ subdirectory.  To preserve the change history
> > this should be done with `p4 integrate`:
> > 
> >     p4 integrate win32/ext/Win32/... ext/Win32/...
> >     p4 delete win32/ext/Win32/... 
> > 
> > The attached patch then updates Configure to build the module under cygwin
> > only, and updates the MANIFEST.  The MSWin32 builds will continue to find
> > the module automatically using the FindExt.pm module.
> 
> Thanks, applied as #29483.
> 
> Is it worth doing likewise with win32/ext/Win32API/File ? I've no idea 
> whether that works under Cygwin or not.

Configure part backported.


-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.9.x   on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.0 & 10.1, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org
http://mirrors.develooper.com/hpux/            http://www.test-smoke.org
                        http://www.goldmark.org/jeff/stupid-disclaimers/
0
h
12/7/2006 10:33:35 AM
On Thu, 07 Dec 2006 09:14:43 +0000, Steve Hay <steve.hay@uk.radan.com> wrote:

>Jan Dubois wrote:
>Is it worth doing likewise with win32/ext/Win32API/File ? I've no idea 
>whether that works under Cygwin or not.

Yes, it works under Cygwin, and yes, I think it should be moved too.

I just started with Win32 to make sure everything still works after the
move.  It is not done yet; I plan to do the following additional steps:

1) Move the remaining Win32::* functions from win32/win32.c into
   ext/Win32/Win32.xs and just add forwarding stubs to win32/win32.c
   that will "require Win32" and then call the function in Win32.xs.

   This makes the functions available to Cygwin too.  Currently "they"
   maintain their own copy of theses function in a statically linked
   extension called win32core or something like that, but that isn't
   part of bleadperl.

2) Create an ext/win32core extension containing the stub functions
   from win32/win32.c.  Make sure Cygwin will statically link this
   extension.

   With this change Cygwin should behave identically with regards
   to all the Win32::* builtin functions right out of the box.

3) Statically link the ext/win32core module for MSWin32 builds too,
   allowing us to remove the stubs from win32/win32.c.

4) Update the docs to explain that some Win32::* functions are
   always defined for historical reasons, but recommend that users
   should do a "use Win32" whenever they use any of them.

5) Remove the Win32 module from libwin32 and release it separately
   on CPAN to allow easier maintenance.

Please let me know if you see any problems with this plan!

Cheers,
-Jan

0
jand
12/7/2006 7:21:15 PM
----=_q2akn2lmcnmsa4uji9vk7v6kituvsvmn4t.MFSBCHJLHS
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

On Thu, 07 Dec 2006 11:21:15 -0800, Jan Dubois <jand@ActiveState.com> wrote:


>I just started with Win32 to make sure everything still works after the
>move.  It is not done yet; I plan to do the following additional steps:
>
>1) Move the remaining Win32::* functions from win32/win32.c into
>   ext/Win32/Win32.xs and just add forwarding stubs to win32/win32.c
>   that will "require Win32" and then call the function in Win32.xs.

It turned out that this move was not as easy as expected.  The problems
fall into 2 areas:

1) miniperl can no longer use Win32::* functions because it cannot load
   Win32.dll.

2) Some tests fail because they change the working directory, so loading
   the Win32::* functions at runtime via -I../lib doesn't always work.

The changes in patch1.diff modify the build scripts, test script and
some modules used via miniperl to deal with this correctly.

patch2.diff moves the Win32::* functions into the ext/Win32 module and
adds forwarder functions to load the module at runtime on first use:

  static void
  forward(pTHX_ const char *function)
  {
      dXSARGS;
      Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpvn("Win32",5), NULL);
      PUSHMARK(SP-items);
      call_pv(function, GIMME_V);
  }

  #define FORWARD(function) XS(w32_##function){ forward(aTHX_ "Win32::"#function); }
  FORWARD(GetCwd)
  FORWARD(SetCwd)
  ...

Cheers,
-Jan


----=_q2akn2lmcnmsa4uji9vk7v6kituvsvmn4t.MFSBCHJLHS
Content-Type: application/octet-stream; name=patch2.diff
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=patch2.diff

ZGlmZiAtZHVyIGJsZWFkcGVybC9leHQvV2luMzIvV2luMzIueHMgcGF0Y2hlZC9leHQvV2luMzIv
V2luMzIueHMKLS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RF9vbihzdik7
CisjZW5kaWYKKworCUVYVEVORChTUCwxKTsKKwlTdlBPS19vbihzdik7CisJU1QoMCkgPSBzdjsK
KwlYU1JFVFVSTigxKTsKKyAgICB9CisgICAgWFNSRVRVUk5fVU5ERUY7Cit9CisKK3N0YXRpYwor
WFModzMyX1NldEN3ZCkKK3sKKyAgICBkWFNBUkdTOworICAgIGlmIChpdGVtcyAhPSAxKQorCVBl
cmxfY3JvYWsoYVRIWF8gInVzYWdlOiBXaW4zMjo6U2V0Q3VycmVudERpcmVjdG9yeSgkY3dkKSIp
OworICAgIGlmICghUGVybERpcl9jaGRpcihTdlBWX25vbGVuKFNUKDApKSkpCisJWFNSRVRVUk5f
WUVTOworCisgICAgWFNSRVRVUk5fTk87Cit9CisKK3N0YXRpYworWFModzMyX0dldE5leHRBdmFp
bERyaXZlKQoreworICAgIGRYU0FSR1M7CisgICAgY2hhciBpeCA9ICdDJzsKKyAgICBjaGFyIHJv
b3RbXSA9ICJfOlxcIjsKKworICAgIEVYVEVORChTUCwxKTsKKyAgICB3aGlsZSAoaXggPD0gJ1on
KSB7CisJcm9vdFswXSA9IGl4Kys7CisJaWYgKEdldERyaXZlVHlwZShyb290KSA9PSAxKSB7CisJ
ICAgIHJvb3RbMl0gPSAnXDAnOworCSAgICBYU1JFVFVSTl9QVihyb290KTsKKwl9CisgICAgfQor
ICAgIFhTUkVUVVJOX1VOREVGOworfQorCitzdGF0aWMKK1hTKHczMl9HZXRMYXN0RXJyb3IpCit7
CisgICAgZFhTQVJHUzsKKyAgICBFWFRFTkQoU1AsMSk7CisgICAgWFNSRVRVUk5fSVYoR2V0TGFz
dEVycm9yKCkpOworfQorCitzdGF0aWMKK1hTKHczMl9TZXRMYXN0RXJyb3IpCit7CisgICAgZFhT
QVJHUzsKKyAgICBpZiAoaXRlbXMgIT0gMSkKKwlQZXJsX2Nyb2FrKGFUSFhfICJ1c2FnZTogV2lu
MzI6OlNldExhc3RFcnJvcigkZXJyb3IpIik7CisgICAgU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KENvcHlGaWxl
KQorRk9SV0FSRChTbGVlcCkKK0ZPUldBUkQoU2V0Q2hpbGRTaG93V2luZG93KQorI3VuZGVmIEZP
UldBUkQKIAogdm9pZAogUGVybF9pbml0X29zX2V4dHJhcyh2b2lkKQpAQCAtNDc5MiwxNyArNDMz
MCw2IEBACiAgICAgbmV3WFMoIldpbjMyOjpDb3B5RmlsZSIsIHczMl9Db3B5RmlsZSwgZmlsZSk7
CiAgICAgbmV3WFMoIldpbjMyOjpTbGVlcCIsIHczMl9TbGVlcCwgZmlsZSk7CiAgICAgbmV3WFMo
IldpbjMyOjpTZXRDaGlsZFNob3dXaW5kb3ciLCB3MzJfU2V0Q2hpbGRTaG93V2luZG93LCBmaWxl
KTsKLQotICAgIC8qIFhYWCBCbG9hdCBBbGVydCEgVGhlIGZvbGxvd2luZyBBY3RpdmV3YXJlIHBy
ZWxvYWRzIHJlYWxseQotICAgICAqIG91Z2h0IHRvIGJlIHBhcnQgb2YgV2luMzI6OlN5czo6Kiwg
c28gdGhleSdyZSBub3QgaW5jbHVkZWQKLSAgICAgKiBoZXJlLgotICAgICAqLwotICAgIC8qIExv
b2t1cEFjY291bnROYW1lCi0gICAgICogTG9va3VwQWNjb3VudFNJRAotICAgICAqIEluaXRpYXRl
U3lzdGVtU2h1dGRvd24KLSAgICAgKiBBYm9ydFN5c3RlbVNodXRkb3duCi0gICAgICogRXhwYW5k
RW52cmlyb25tZW50U3RyaW5ncwotICAgICAqLwogfQogCiB2b2lkICoK

----=_q2akn2lmcnmsa4uji9vk7v6kituvsvmn4t.MFSBCHJLHS
Content-Type: application/octet-stream; name=patch1.diff
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=patch1.diff

ZGlmZiAtZHVyIGJsZWFkcGVybC9leHQvU0RCTV9GaWxlL01ha2VmaWxlLlBMIHBhdGNoZWQvZXh0
L1NEQk1fRmlsZS9NYWtlZmlsZS5QTAotLS0gYmxlYWRwZXJsL2V4dC9TREJNX0ZpbGUvTWFrZWZ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lsbCBubyBsb25nZXIgd29yayBvbmNl
CisjIHdlIGNoZGlyKCkgaW50byB0aGUgVEVNUCBkaXJlY3RvcnkuCit1c2UgV2luMzI7CisKIHVz
ZSBXaW4zMkFQSTo6RmlsZSBxdyg6QUxMKTsKICRsb2FkZWQgPSAxOwogcHJpbnQgIm9rIDFcbiI7
Cg==

----=_q2akn2lmcnmsa4uji9vk7v6kituvsvmn4t.MFSBCHJLHS--
0
jand
12/9/2006 3:07:06 AM
On 09/12/06, Jan Dubois <jand@activestate.com> wrote:
> >I just started with Win32 to make sure everything still works after the
> >move.  It is not done yet; I plan to do the following additional steps:
> >
> >1) Move the remaining Win32::* functions from win32/win32.c into
> >   ext/Win32/Win32.xs and just add forwarding stubs to win32/win32.c
> >   that will "require Win32" and then call the function in Win32.xs.
>
> It turned out that this move was not as easy as expected.  The problems
> fall into 2 areas:
>
> 1) miniperl can no longer use Win32::* functions because it cannot load
>    Win32.dll.
>
> 2) Some tests fail because they change the working directory, so loading
>    the Win32::* functions at runtime via -I../lib doesn't always work.
>
> The changes in patch1.diff modify the build scripts, test script and
> some modules used via miniperl to deal with this correctly.
>
> patch2.diff moves the Win32::* functions into the ext/Win32 module and
> adds forwarder functions to load the module at runtime on first use:
>
>   static void
>   forward(pTHX_ const char *function)
>   {
>       dXSARGS;
>       Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpvn("Win32",5), NULL);
>       PUSHMARK(SP-items);
>       call_pv(function, GIMME_V);
>   }
>
>   #define FORWARD(function) XS(w32_##function){ forward(aTHX_ "Win32::"#function); }
>   FORWARD(GetCwd)
>   FORWARD(SetCwd)

Thanks, patches applied as change #29509 and #29510.

Note that this also impacts those dual-lived modules:

* PathTools (BTW, any new maintainer yet?)
* ExtUtils::MM

(Further patch in this thread applied as change #29511 -- impacts Storable.)
0
rgarciasuarez
12/11/2006 1:28:40 PM
On Dec 11, 2006, at 7:28 AM, Rafael Garcia-Suarez wrote:

>
> Thanks, patches applied as change #29509 and #29510.
>
> Note that this also impacts those dual-lived modules:
>
> * PathTools (BTW, any new maintainer yet?)

Applied to PathTools too.

Philippe Bruhat volunteered to be a co-maintainer, we're waiting for  
svk@perl.org to grant access, I think.

  -Ken

0
ken
12/14/2006 5:24:53 AM
Rafael Garcia-Suarez wrote:
> Thanks, patches applied as change #29509 and #29510.
> 
> Note that this also impacts those dual-lived modules:
> 
> * PathTools (BTW, any new maintainer yet?)
> * ExtUtils::MM
> 
> (Further patch in this thread applied as change #29511 -- impacts
> Storable.)

So that I understand what's going on here... the Win32:: functions have been removed from miniperl so determining the Windows version in miniperl has become more complex.  Ok, but I cringe a bit at the indirect way the new checks are written.  "If some DynaLoader function exists, then we can use a  Win32 function.  Else, check some obscure environment variable to determine if its Win95 or Win32."

How about something more direct...

$IsWin95 = defined &Win32::IsWin95 ? Win32::IsWin95() : !defined $ENV{SYSTEMROOT};

The outwardly unrelated DynaLoader is completely removed from the equation, this better future proofs uses of Win32::, and the purpose of using SYSTEMROOT as a fallback is made plain.

This is what I'm patching into MakeMaker.

--- lib/ExtUtils/MM.pm  (revision 26404)
+++ lib/ExtUtils/MM.pm  (local)
@@ -43,12 +43,19 @@
     sub DESTROY {}
 }
 
+sub _is_win95 {
+    # miniperl might not have the Win32 functions available and we need
+    # to run in miniperl.
+    return defined &Win32::IsWin95 ? Win32::IsWin95() 
+                                   : ! defined $ENV{SYSTEMROOT}; 
+}
+
 my %Is = ();
 $Is{VMS}    = $^O eq 'VMS';
 $Is{OS2}    = $^O eq 'os2';
 $Is{MacOS}  = $^O eq 'MacOS';
 if( $^O eq 'MSWin32' ) {
-    Win32::IsWin95() ? $Is{Win95} = 1 : $Is{Win32} = 1;
+    _is_win95 ? $Is{Win95} = 1 : $Is{Win32} = 1;
 }
 $Is{UWIN}   = $^O =~ /^uwin(-nt)?$/;
 $Is{Cygwin} = $^O eq 'cygwin';


Also, is it necessary to say "use Win32" now?

0
schwern
12/18/2006 8:10:39 PM
On Mon, 18 Dec 2006 15:10:39 -0500, Michael G Schwern <schwern@gmail.com> wrote:

>So that I understand what's going on here... the Win32:: functions have been removed
>from miniperl so determining the Windows version in miniperl has become more complex.
>Ok, but I cringe a bit at the indirect way the new checks are written.  "If some
>DynaLoader function exists, then we can use a  Win32 function.  Else, check some
>obscure environment variable to determine if its Win95 or Win32."
>
>How about something more direct...
>
>$IsWin95 = defined &Win32::IsWin95 ? Win32::IsWin95() : !defined $ENV{SYSTEMROOT};
>
>The outwardly unrelated DynaLoader is completely removed from the equation, this better
>future proofs uses of Win32::, and the purpose of using SYSTEMROOT as a fallback
>is made plain.

Sure, the problem is that your code doesn't work.  The function is always defined
for backward compatibility reasons.  It just implemented something like this (in XS):

  sub Win32::IsWin95 {
      eval "use Win32 0.27";
      die $@ if $@;
      goto &Win32::IsWin95;
  }

Therefore your version will just die on Win9X.  A better fix would be to
add more documentation about the situation:

  # The Win32::IsWin32() requires a working DynaLoader, so it will not be available
  # under miniperl.  In that case we fall back checking for the existence of
  # $ENV{SYSTEMROOT}.  This environment variable has been introduced on Windows NT
  # and is not normally defined on Windows 9X.

[...]

>Also, is it necessary to say "use Win32" now?

No, it is not necessary (that would break backwards compatibility), but it
is recommended, as it would make sure you load the latest version of the
functions in case you have upgraded Win32 from CPAN.

But remember that "use Win32" will not work under miniperl, so don't do it
in MakeMaker!

Cheers,
-Jan

0
jand
12/18/2006 9:10:02 PM
Jan Dubois wrote:
>> How about something more direct...
>>
>> $IsWin95 = defined &Win32::IsWin95 ? Win32::IsWin95() : !defined $ENV{SYSTEMROOT};
>>
>> The outwardly unrelated DynaLoader is completely removed from the equation, this better
>> future proofs uses of Win32::, and the purpose of using SYSTEMROOT as a fallback
>> is made plain.
> 
> Sure, the problem is that your code doesn't work.  The function is always defined
> for backward compatibility reasons.  It just implemented something like this (in XS):
> 
>   sub Win32::IsWin95 {
>       eval "use Win32 0.27";
>       die $@ if $@;
>       goto &Win32::IsWin95;
>   }

Perhaps instead use an AUTOLOAD?

  package Win32;
  sub AUTOLOAD {
	eval "use Win32 0.27";
	die $@ if $@;

	# Once we've loaded Win32.pm we no longer need the AUTOLOAD
	delete $Win32::{AUTOLOAD};

	no strict 'refs';
	goto &{$AUTOLOAD};
  }

It will be called once to automatically load Win32.pm and then never again so no run-time performance loss.  It also means defined &Win32::foo works as expected.  One less surprise for the user.

0
schwern
12/18/2006 9:38:47 PM
On Mon, 18 Dec 2006 16:38:47 -0500, Michael G Schwern <schwern@gmail.com> wrote:

>Jan Dubois wrote:
>>> How about something more direct...
>>>
>>> $IsWin95 = defined &Win32::IsWin95 ? Win32::IsWin95() : !defined $ENV{SYSTEMROOT};
>>>
>>> The outwardly unrelated DynaLoader is completely removed from the equation, this better
>>> future proofs uses of Win32::, and the purpose of using SYSTEMROOT as a fallback
>>> is made plain.
>> 
>> Sure, the problem is that your code doesn't work.  The function is always defined
>> for backward compatibility reasons.  It just implemented something like this (in XS):
>> 
>>   sub Win32::IsWin95 {
>>       eval "use Win32 0.27";
>>       die $@ if $@;
>>       goto &Win32::IsWin95;
>>   }
>
>Perhaps instead use an AUTOLOAD?
>
>  package Win32;
>  sub AUTOLOAD {
>	eval "use Win32 0.27";
>	die $@ if $@;
>
>	# Once we've loaded Win32.pm we no longer need the AUTOLOAD
>	delete $Win32::{AUTOLOAD};
>
>	no strict 'refs';
>	goto &{$AUTOLOAD};
>  }
>
>It will be called once to automatically load Win32.pm and then never again so
>no run-time performance loss.  It also means defined &Win32::foo works as expected.

Well, it doesn't, because Win32::* functions are now no longer defined until you
call the first one of them through the AUTOLOAD.  This is a user visible change
and therefore not really acceptable.

The current implementation also runs only once, because the Win32.xs code will
replace all the stub entries with the real functions.  So there is no run-time
performance loss either.

>One less surprise for the user.

There are *no* surprises for the user with the current implementation, which is why
I really want to leave it as is.  The only impact is on other *core* modules that
need to work with miniperl, and I've provided changes to make those work as well.

I did provide some additional documentation in my previous message in this thread.
Please apply it as well to make the change less obscure!

Cheers,
-Jan
0
jand
12/18/2006 10:39:22 PM
On Mon, 18 Dec 2006 15:10:39 -0500, Michael G Schwern <schwern@gmail.com> wrote:

>This is what I'm patching into MakeMaker.
>
>--- lib/ExtUtils/MM.pm  (revision 26404)
>+++ lib/ExtUtils/MM.pm  (local)
>@@ -43,12 +43,19 @@
>     sub DESTROY {}
> }
> 
>+sub _is_win95 {
>+    # miniperl might not have the Win32 functions available and we need
>+    # to run in miniperl.
>+    return defined &Win32::IsWin95 ? Win32::IsWin95() 
>+                                   : ! defined $ENV{SYSTEMROOT}; 
>+}
>+


Here is an implementation that is less obscure and also works with the
current implementation:

sub _is_win95 {
    return 0 unless $^O eq "MSWin32";
    # Win32::* functions are not operational under miniperl because
    # they use the DynaLoader to load the real implementation.
    my $is95 = eval { Win32::IsWin95() };
    if ($@) {
	# The SYSTEMROOT environment variable is only set by
	# Windows NT and later.
	$is95 = !defined $ENV{SYSTEMROOT};
    }
    return $is95;
}

Cheers,
-Jan
0
jand
12/18/2006 11:02:27 PM
Reply:

Similar Artilces:

re: [PATCH] Move Win32::* functions from win32/win32.c to ext/Win32/Win32.xs
----=_e3pon25ktlh8mqd3tgjj1tt7en166ucrfq.MFSBCHJLHS Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > patch2.diff moves the Win32::* functions into the ext/Win32 module and > adds forwarder functions to load the module at runtime on first use: > > static void > forward(pTHX_ const char *function) > { > dXSARGS; > Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpvn("Win32",5), NULL); > PUSHMARK(SP-items); > call_pv(function, GIMME_V); > } It just occurred to me that Perl_load_modul...

[PATCH] get ext/Win32/Win32.xs to compile on cygwin
----=_l7irn21hmijqdimi9l14v652q69nqrhgio.MFSBCHJLHS Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The functions from win32/win32.c don't compile out-of-the-box on cygwin. The attached patch fixes this, mostly along the lines of the externally maintained win32core module for cygwin: http://libwin32-exp.cvs.sourceforge.net/libwin32-exp/libwin32-exp/Win32CORE/ I'm not too happy about 2 issues though: 1) The win32_longpath() function is duplicated in Win32.xs for cygwin. We can call the version in win32/win32.c for MSWin32, but that o...

[patch] ext/Win32/Win32.xs compilation fails on msvc < 6
A patch for smoke, fixes compilation on older msvc versions: --- /home/dk/src/perl-current/ext/Win32/Win32.xs 2007-06-26 11:10:49.000000000 +0200 +++ ./Win32.xs 2007-09-17 10:49:43.000000000 +0200 @@ -43,6 +43,13 @@ # define CSIDL_FLAG_CREATE 0x8000 #endif +#ifndef CSIDL_COMMON_FAVORITES +# define CSIDL_COMMON_FAVORITES 0x001F +# define CSIDL_COOKIES 0x0021 +# define CSIDL_HISTORY 0x0022 +# define CSIDL_INTERNET_CACHE 0x0020 +#endif + #ifndef CSIDL_ADMINTOOLS # define CSIDL_ADMINTOOLS 0x0030 ...

Win32::API and Win32::GUI
Hello, Is there anyone using one of these modules? I would like to exchange information about how to use them. Thanks in Advance, H3li0 __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ On Sun, May 27, 2001 at 11:32:16PM -0700, Helio S. Junior wrote: > Is there anyone using one of these modules? > I would like to exchange information about > how to use them. You're likely to find people using those modules on <perl-win32-users@activestate.com&g...

[PATCH] README.win32 and win32/makefile.mk differ
Hi! README.win32 says: > ... The > defaults in the dmake makefile are setup to build using the GCC > compiler. But win32/makefile.mk contains: #CCTYPE *= MSVC20 #CCTYPE *= MSVC CCTYPE *= MSVC60 #CCTYPE *= BORLAND #CCTYPE *= GCC This patch makes README.win32 follow win32/makefile.mk: --- README.win32.orig Wed Jun 5 04:02:02 2002 +++ README.win32 Fri Jun 7 13:21:40 2002 @@ -192,7 +192,8 @@ This directory contains a "Makefile" that will work with versions of nmake that come with Visual C++ or the Platform SDK, and a dmake "makefile.mk&...

[PATCH win32/win32.c] silence compiler warnings
--------------Boundary-00=_6UC8EV15X4AEVLIULI8W Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi porters, These warnings should be gone with this patch: win32.c: In function `win32_execvp': win32.c:3974: warning: passing arg 3 of `win32_spawnvp' from incompatible= pointer type win32.c: In function `w32_DomainName': win32.c:4433: warning: passing arg 2 of `WideCharToMultiByte' makes integ= er from pointer without a cast win32.c:4437: warning: passing arg 2 of `WideCharToMultiByte' makes integ= er from...

[patch] Adjust make_ext.pl on Win32 for the move of Text-ParseWords from ext/ to cpan/
--------------090502050709000803090407 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hello p5p, attached patch fixes make_ext.pl for the special case of Text::ParseWords, which got moved from ext/ to cpan/ -max --------------090502050709000803090407 Content-Type: text/x-diff; name="0001-Adjust-make_ext.pl-on-Win32-for-the-move-of-Text-Par.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0001-Adjust-make_ext.pl-on-Win32-for-the-move-of-Text-Par.pa"; filename*1="tch&q...

[PATCH] RE: PeekMessage() call in win32\win32.c win32_async_check
------=_NextPart_000_015A_01C601C4.9DB30210 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, 13 Dec 2005, Jan Dubois wrote: > On Sat, 10 Dec 2005, Jan Dubois wrote: >> On Sat, 10 Dec 2005, Nick Ing-Simmons wrote: >>> Found this festering in an archive mailbox seems related to recent >>> "alarm() ..." thread I've addressed the issues raised in that message as good as possible for WinNT and earlier. For Windows 2000 and later they should be fixed completely due to using our own message window ...

[PATCH t\win32] system_tests are relevant only to win32\system.t
system_tests are relevant only to win32\system.t, so let them be in the same directory. This patch does that. After applying this, someone should move t\op\system_tests to t\win32\system_tests. [Patch] diff -uaNdr bleadperl/t/win32/system.t workin_bleadperl/t/win32/system.t --- bleadperl/t/win32/system.t Wed Apr 24 02:15:06 2002 +++ workin_bleadperl/t/win32/system.t Fri Apr 26 15:23:32 2002 @@ -96,7 +96,7 @@ END { chdir($cwd) && rmtree("$cwd/$testdir") if -d "$cwd/$testdir"; } -if (open(my $EIN, "$cwd/op/${exename}_exe.uu")) { ...

[PATCH 5.6.0+] fix for Win32::GetFullPathName and Win32::GetShortPathName
On Win NT 4, the GetShortPathName() and GetFullPathName() APIs crash when invoked with an empty filename. Attached patch avoids this. Of course it doesn't make any sense to call these functions without a filename, but that is a different issue. -Jan --- win32/win32.c.prev Fri Jul 14 19:33:26 2000 +++ win32/win32.c Fri Aug 18 16:22:54 2000 @@ -3860,6 +3860,9 @@ shortpath = sv_mortalcopy(ST(0)); SvUPGRADE(shortpath, SVt_PV); + if (!SvPVX(shortpath) || !SvLEN(shortpath)) + XSRETURN_UNDEF; + /* src == target is allowed */ do { len = Get...

Difference between Win32::API and Win32::OLE.
Difference between Win32::API and Win32::OLE. As I know, Win32::API can import and call functions from Win32's Dynamic Link Libraries (DLL), I was wondering if it can import and call functions from standalone executables, just like Win32:OLE does. I tried Win32::OLE to call serveral funtions in a satandalone executbles, but failed with an error: Type Mismatch... I cannot find a good way to avoid this error... ...

[PATCH@23361] RE: [PATCH-for-23358] enable statically linked exte nsions for Win32
------_=_NextPart_000_01C4B0E7.DA3E5AB0 Content-Type: text/plain; charset="koi8-r" > > I did modifications so my patch should fit 592. > > > > Thanks, applied to bleadperl as change #23360. Thanks, attached is continuation of previous one. it also makes win32/Makefile and win32/makefile.mk closer. Best regards, Vadim. ------_=_NextPart_000_01C4B0E7.DA3E5AB0 Content-Type: text/plain; name="w32makefiles-patch-for-23361.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="w32makef...

[PATCH] Added entries to win32/config.gc64 and win32/config.gc64nox that were added to config.gc.
--_----------=_1282430511147130 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" Date: Sat, 21 Aug 2010 18:41:51 -0400 X-Mailer: MessagingEngine.com Webmail Interface I did a "diff -u3 -r perl-5.12.1/win32 perl-5.13.4/win32" (as preparation for making the patches for testing a Strawberryish build of 5.13.4) and noticed that config.gc had been changed, but the parallel changes had not been made to config.gc64 and config.gc64nox. This patch makes those changes. Could it be committed to blead, please? (This may fi...

win32s
I have just one general question: Does Power++ 2 generate WIN32s code (what version)? Thanks for answer. Dalibor ********************************************************************* Dalibor Zliechovec telephone: +420 7 761604,787798 Frequentis, spol. s r. o. company WWW: www.frequentis.com Hanulova 5/B company e-mail: frqbra@computel.sk 841 01 Bratislava private e-mail:zliecho@pdpr.pod.sk Dalibor Zliechovec wrote: > I have just one general question: > Does Power++ 2 generate WIN32s code (what version)? ...

Web resources about - [PATCH] Move Win32 from win32/ext/Win32 to ext/Win32 - perl.perl5.porters

Resources last updated: 12/2/2015 7:33:26 PM