This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Win32 miniperl: delay loading for Winsock, and then remove it
authorDaniel Dragan <bulk88@hotmail.com>
Sat, 13 Oct 2012 23:37:33 +0000 (19:37 -0400)
committerSteve Hay <steve.m.hay@googlemail.com>
Wed, 31 Oct 2012 13:31:45 +0000 (13:31 +0000)
commit19253ae62cd130797cb3e42f196ac26a6417e08c
tree84be33f7f26ce913616ca62c47e66abacdba0665
parent5c26a17602c4585ca111bd154f6c65c681cd0572
Win32 miniperl: delay loading for Winsock, and then remove it

Slim down the image and speed up start up time for Win32 miniperl by
removing Winsock. Also if the build process on Win32 in the future
requires sockets, commenting one line in win32.h will turn sockets back on
for miniperl, but this time with delay loading on VC Perl. The only casulty
of no sockets for Win32 miniperl was figuring out the computer's name in
win32/config_sh.PL. A workaround by using an ENV var was implemented. The
purpose of this commit is to speed up the build process of Perl.

As said in the comment in win32.h, the WIN32_NO_SOCKETS macro is
incomplete in implementation. It is only removed winsock from being linked
in in miniperl, not full Perl. PERL_IMPLICIT_SYS (specifically PerlSock in
win32/perlhost.h) and makedef.pl's hard coded list of win32_* function
exports cause winsock to still be linked in with even with
WIN32_NO_SOCKETS on full perl. Both PERL_IMPLICIT_SYS (win32/perlhost.h)
and makedef.pl would require changes to remove winsock from being linked
in on full perl in the future.
win32/Makefile
win32/config_sh.PL
win32/makefile.mk
win32/win32.c
win32/win32.h
win32/win32sck.c