in reply to Win32::Lanman for 5.10

Here's a starter - for which you'll need a Microsoft Compiler and SDK - and perl-5.10.0, though if you're using 5.10.1, I'm sure that could be worked around:
First, in the lanman source distro, insert this near the beginning of plmisc.h (just below the second line of that file):
// perl 5.10.0 build 10xx #ifdef PERL_5_10_0 #ifdef PERL_OBJECT #undef PERL_OBJECT #endif #define PERL_CALL_SINGLE #define PERL_CALL #define P_PERL #define P_PERL_SINGLE #endif
Then set up the makefile to accommodate the existence of perl-5.10.0. This patch will do that:
--- makefile.orig Tue Nov 24 11:03:55 2009 +++ makefile Tue Nov 24 11:43:05 2009 @@ -6,6 +6,7 @@ # # output directory for the appropriate build # +outdir10xx=.\perl.10xx.release outdir8xx=.\perl.8xx.release outdir6xx=.\perl.6xx.release outdir5xx=.\perl.5xx.release @@ -14,6 +15,7 @@ # where is the perl appropriate directory (the include header files m +ust reside # in $(outdir)\lib\core) # +perldir10xx=c:\_32\perl_vc7\5.10.0 perldir8xx=c:\perl.8xx perldir6xx=c:\perl.6xx perldir5xx=c:\perl.5xx @@ -36,7 +38,7 @@ # # where is the platform sdk installed? # -platformsdk=c:\program files\microsoft sdk +platformsdk=c:\vsnet\Vc7\PlatformSDK #platformsdk=c:\microsoft sdk # @@ -57,10 +59,11 @@ !message !endif -!if "$(cfg)" != "perl.8xx" && "$(cfg)" != "perl.6xx" && "$(cfg)" != " +perl.5xx" +!if "$(cfg)" != "perl.10xx" && "$(cfg)" != "perl.8xx" && "$(cfg)" != +"perl.6xx" && "$(cfg)" != "perl.5xx" !message !message Invalid configuration "$(cfg)" specified. Valid configuratio +ns are: !message +!message perl.10xx (for perl 5.10.0 build 8xx) !message perl.8xx (for perl 5.8.0 build 8xx) !message perl.6xx (for perl 5.6 build 6xx) !message perl.5xx (for perl 5.005_03 build 5xx) @@ -74,7 +77,36 @@ !error Invalid configuration specified. !endif -!if "$(cfg)" == "perl.8xx" +!if "$(cfg)" == "perl.10xx" + +# +# set parameters to build for (for perl 5.10.0 build 8xx) +# + +# set the output directory +outdir=$(outdir10xx) +# where is perl installed? +perldir="$(perldir10xx)" +# add per bin path to the path environment +PATH=$(perldir10xx)\bin;$(PATH) +# where is pod2html? +pod2html="$(perldir10xx)\bin\pod2html" +# where is ppm? +ppm="$(perldir10xx)\bin\ppm2" +# where do I find the perl include files and the perl510.lib? +perlsrcdir="$(perldir10xx)\lib\core" +# additional compiler settings +cpp_add_flags=/D PERL_5_10_0 +# additional linker settings +link_add_flags=perl510.lib +# dll name to create +dllname=$(prj).dll +# prefix output tar.gz file +targz_prefix= +# tar.gz file directory +targz_dir=mswin32-x86-multi-thread-5.10 + +!elseif "$(cfg)" == "perl.8xx" # # set parameters to build for (for perl 5.8.0 build 8xx)
Your "perldir10xx" and "platformsdk" settings will almost certainly be different to mine - but the other changes should be applicable as is. (If you'd rather just get a copy of the amended makefile, /msg me your email address and I'll send it over - then you'd only have to make those alterations to "perldir10xx" and "platformsdk" and you'd be right to go.)

Then run nmake clean cfg=perl.10xx followed by nmake cfg=perl.10xx and see how it goes. If you're using MSVC++ 6.0, that might be all you need to do.
However, the build process doesn't succeed for me because my SDK (I have MSVC++ 7.0) doesn't have lmbrowsr.h and lmchdev.h - so I removed the call to #include those files from the files that try to #include them. (If you have MSVC++ 6.0, this may be unnecessary.)

In lanman.cpp, there are 4 occurrences of the comment // oops, not longer supported. For each of those occurrences, I had to remove the first line following the comment. Again, you may not need to do this if you have MSVC++ 6.0.

With that all done, the build ultimately fails with 4 "unresolved external symbols", which I haven't investigated. Which compiler do you have ?

Another possible solution - I see that there are ppm packages for this module for 5.6 and 5.8 at the bribes rep. The maintainer of that rep uses MSVC++ 6.0, so he may be able to build a 5.10 ppm, if approached. Yet another solution would be to install a perl-5.8 (as a second perl installation) just so you can make use of the existing ppm.

It's a pity that the source for such a useful module (by all accounts) is in such a poor state.

Cheers,
Rob