develooper Front page | perl.perl5.porters | Postings from March 2004

[PATCH] Move Win32.pm/Win32.xs from libwin32 module to core Perl

Thread Previous | Thread Next
From:
Jan Dubois
Date:
March 18, 2004 13:18
Subject:
[PATCH] Move Win32.pm/Win32.xs from libwin32 module to core Perl
Message ID:
lg2k509o51b8openotuetdts6go7pn4udo@4ax.com
[was: Extend Win32::GetOSVersion() to return additional information ]

On Wed, 30 Jul 2003 18:36:54 -0700, Jan Dubois <jand@ActiveState.com> wrote:

>On Wed, 30 Jul 2003 18:12:22 -0700, Gurusamy Sarathy
><gsar@ActiveState.com> wrote:
>
>>On Wed, 30 Jul 2003 16:42:22 PDT, Michael G Schwern wrote:
>>>I'd tend to agree, the line between win32.c and libwin32 seems artificial.  
>>>It also looks like libwin32 is practically a necessity to get anything 
>>>interesting done on Win32. What say, Jarkko of Borg and Sarathy of State?
>>
>>I don't think all of libwin32 belongs in the core.  The parts that
>>are documented in Win32.pod should certainly be added to the core,
>>as we've discussed in the past:
>>
>>  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-01/msg00381.html
>>
>>I haven't seen any patches, though.
>
>I can look into moving Win32.pm/Win32.xs (but nothing else) into the core.
>This should happen *after* 5.8.1 and libwin32 0.20 have been released.
>Hectic patching right now will just create a mess.

Ok, I've finally remembered to do this.  In addition to the patches included
below, the following files need to be *added*:

  win32/ext/Win32/Makefile.PL
  win32/ext/Win32/Win32.pm
  win32/ext/Win32/Win32.xs

They are all included in the attached tarball.  Please also *delete* the file

  lib/Win32.pod

The documentation is now included in Win32.pm.

The included Win32 module also contains the new Win32::IsAdmin() function
supplied by Steve Hay.

Cheers,
-Jan

==== MANIFEST#8 - MANIFEST ====
Index: MANIFEST
--- MANIFEST.~1~	Thu Mar 18 13:04:54 2004
+++ MANIFEST	Thu Mar 18 13:04:54 2004
@@ -2146,7 +2146,6 @@
 lib/warnings.pm			For "use warnings"
 lib/warnings/register.pm	For "use warnings::register"
 lib/warnings.t			See if warning controls work
-lib/Win32.pod			Documentation for Win32 extras
 locale.c			locale-specific utility functions
 makeaperl.SH			perl script that produces a new perl binary
 makedef.pl			Create symbol export lists for linking
@@ -3022,6 +3021,9 @@
 win32/config.vc64		Win64 base line config.sh (Visual C++ build)
 win32/distclean.bat		Remove _ALL_ files not listed here in MANIFEST
 win32/dl_win32.xs		Win32 port
+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

==== win32/Makefile#7 - win32\Makefile ====
Index: win32/Makefile
--- win32/Makefile.~1~	Thu Mar 18 13:04:54 2004
+++ win32/Makefile	Thu Mar 18 13:04:54 2004
@@ -701,6 +701,7 @@
 XSAPITEST		= $(EXTDIR)\XS\APItest\APItest
 XSTYPEMAP		= $(EXTDIR)\XS\Typemap\Typemap
 UNICODENORMALIZE	= $(EXTDIR)\Unicode\Normalize\Normalize
+WIN32_DIR		= ext\Win32
 
 SOCKET_DLL		= $(AUTODIR)\Socket\Socket.dll
 FCNTL_DLL		= $(AUTODIR)\Fcntl\Fcntl.dll
@@ -731,6 +732,7 @@
 XSAPITEST_DLL		= $(AUTODIR)\XS\APItest\APItest.dll
 XSTYPEMAP_DLL		= $(AUTODIR)\XS\Typemap\Typemap.dll
 UNICODENORMALIZE_DLL	= $(AUTODIR)\Unicode\Normalize\Normalize.dll
+WIN32_DLL		= $(AUTODIR)\Win32\Win32.dll
 
 EXTENSION_C	= 		\
 		$(SOCKET).c	\
@@ -761,7 +763,8 @@
 		$(PERLIOVIA).c	\
 		$(XSAPITEST).c	\
 		$(XSTYPEMAP).c	\
-		$(UNICODENORMALIZE).c
+		$(UNICODENORMALIZE).c	\
+		$(WIN32_DIR).c
 
 EXTENSION_DLL	= 		\
 		$(SOCKET_DLL)	\
@@ -792,7 +795,8 @@
 		$(PERLIOVIA_DLL)	\
 		$(XSAPITEST_DLL)	\
 		$(XSTYPEMAP_DLL)	\
-		$(UNICODENORMALIZE_DLL)
+		$(UNICODENORMALIZE_DLL)	\
+		$(WIN32_DLL)
 
 POD2HTML	= $(PODDIR)\pod2html
 POD2MAN		= $(PODDIR)\pod2man
@@ -981,9 +985,11 @@
 #----------------------------------------------------------------------------------
 Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
 	$(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
+	$(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext
 
 Extensions_clean: 
 	-if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
+	-if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext clean
 
 #----------------------------------------------------------------------------------
 
@@ -1077,6 +1083,7 @@
 	-del /f $(LIBDIR)\XS\APItest.pm
 	-del /f $(LIBDIR)\XS\Typemap.pm
 	-del /f $(LIBDIR)\Unicode\Normalize.pm
+	-del /f $(LIBDIR)\Win32.pm
 	-if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
 	-if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
 	-if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B

==== win32/makefile.mk#7 - win32\makefile.mk ====
Index: win32/makefile.mk
--- win32/makefile.mk.~1~	Thu Mar 18 13:04:54 2004
+++ win32/makefile.mk	Thu Mar 18 13:04:54 2004
@@ -801,7 +801,7 @@
 		Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
 		Sys/Hostname Storable Filter/Util/Call Encode \
 		Digest/MD5 PerlIO/scalar MIME/Base64 Time/HiRes \
-		Unicode/Normalize
+		Unicode/Normalize Win32
 STATIC_EXT	= DynaLoader
 NONXS_EXT	= Errno
 
@@ -1113,9 +1113,11 @@
 #----------------------------------------------------------------------------------
 Extensions : buildext.pl $(PERLDEP) $(CONFIGPM)
 	$(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR)
+	$(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext
 
 Extensions_clean :
 	-if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean
+	-if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext clean
 
 #----------------------------------------------------------------------------------
 
@@ -1198,6 +1200,7 @@
 	-del /f $(LIBDIR)\List\Util.pm
 	-del /f $(LIBDIR)\Scalar\Util.pm
 	-del /f $(LIBDIR)\Unicode\Normalize.pm
+	-del /f $(LIBDIR)\Win32.pm
 	-if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
 	-if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
 	-if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B

End of Patch.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About