Apache OpenOffice (AOO) Bugzilla – Issue 30527
$^O eq "MSWin32" is used to check for WNT (possible cws tooling problem)
Last modified: 2013-08-07 15:34:52 UTC
I used branch mws_srx645 because the cws tooling is already checked in there. The following is a list of occurences where '$^O eq "MSWin32"' is used to check for the Windows operating system. This might be wrong when cygwin's perl is used. Unfortunately each occurence has to be checked if MSWin32 == ActiveState Perl was not accidentally correct. When really the OS is meant, $ENV{OS} should be checked, but if the use of "\" vs. "/" is checked checking for $^O eq "MSWin32" is propably OK. solenv/bin/cwscreate.pl:275: if ( $^O eq 'MSWin32' ) { solenv/bin/cwscreate.pl:298: $globalini = ( $^O eq 'MSWin32' ) solenv/bin/setsolar.pl:280: if ( $^O eq 'MSWin32' ) { solenv/bin/setsolar.pl:548: if ( $^O eq 'MSWin32' ) { solenv/bin/setsolar.pl:885: # MSWin32 solenv/bin/setsolar.pl:886: if ( $^O eq 'MSWin32' ) { solenv/bin/setsolar.pl:922: # surprisingly this works under MSWin32, too solenv/bin/setsolar.pl:1150: if ( $^O eq 'MSWin32' ) { solenv/bin/setsolar.pl:1490: if ( $^O eq 'MSWin32' ) { solenv/bin/setsolar.pl:1531: $globalini = ( $^O eq 'MSWin32' ) solenv/bin/setsolar.pl:1702: if ( $^O eq 'MSWin32' ) { solenv/bin/setsolar.pl:1735: if ( $^O eq 'MSWin32' ) { solenv/bin/cwsresync.pl:871: if ( $^O =~ "MSWin32" ) solenv/bin/cwsresync.pl:1508: print_error("Operation not (yet) supported on Windows", 9) if $^O eq 'MSWin32'; solenv/bin/deliver.pl:225: $command =~ s#/#\\#g if $^O eq 'MSWin32'; solenv/bin/deliver.pl:1023: $zipexe .= ' -y' unless $^O eq 'MSWin32'; solenv/bin/modules/CreatePDBRelocators.pm:121: if ( $^O eq 'MSWin32' ) { solenv/bin/modules/Cvs.pm:85: if ($^O eq "MSWin32" || $^O eq "os2" ) { solenv/bin/modules/CvsModule.pm:78:my $t_cvs_binary = ($^O eq 'MSWin32') ? 'cvsclt2.exe' : 'cvs.clt2'; solenv/bin/build.pl:111: if ( $^O eq 'MSWin32' ) { solenv/bin/build.pl:542: if ( ($^O eq 'MSWin32') && (!defined $ENV{SHELL})) { solenv/bin/build.pl:1387: if ( $^O eq 'MSWin32' ) { solenv/bin/build.pl:1426: if ( $^O eq 'MSWin32' ) { solenv/bin/build.pl:1713: if ( $^O eq 'MSWin32' ) { solenv/bin/build.pl:1747: if ( $^O eq 'MSWin32' ) { solenv/bin/build.pl:1775: if ( $^O eq 'MSWin32' ) { solenv/bin/build.pl:1792: if ( $^O eq 'MSWin32' ) { solenv/bin/cwsadd.pl:231: if ( $^O =~ "MSWin32" ) solenv/bin/cwsadd.pl:484: if ( $^O =~ "MSWin32" ) solenv/bin/cwsanalyze.pl:795: print_error("Operation not (yet) supported on Windows", 9) if $^O eq 'MSWin32';
as you may be affected...
Currently $^O eq 'MSWin32' is reserved for usage Windows with ActiveState under 4NT shell. Cygwin should be handled like Unix in most cases. Maybe we'll need a more granular approach for the mixed cases, when people use ActiveState whithin the cygwin environment (people really shouldn't do this) The CWS tooling is meant for Unix only in the moment. It has never been tested on Windows. Incidently the original version can not work on Windows. The restriction has been removed for OOo but I doubt that it will work immediately out of the box.
Hallo! > Currently $^O eq 'MSWin32' is reserved for usage Windows with ActiveState > under 4NT shell. Cygwin should be handled like Unix in most cases. Well, see below. Most of the cases are just only used in hamburg environment and therefore it doesn't matter. > Maybe we'll need a > more granular approach for the mixed cases, when people use ActiveState > whithin the cygwin environment (people really shouldn't do this) Yes, a configure check that barks on USE_SHELL=4nt and $^O ne 'MSWin32'. > The CWS tooling is meant for Unix only in the moment. It has never been tested > on Windows. Incidently the original version can not work on Windows. The > restriction has been removed for OOo but I doubt that it will work immediately > out of the box. Just say so, when you need a tester for W32-tcsh (cygwin) environment. ;) Some comments on the suspicious lines: (I only looked at the occurences with MSWin.) The cws stuff first: > solenv/bin/cwsresync.pl:871: if ( $^O =~ "MSWin32" ) > solenv/bin/cwsresync.pl:1508: print_error("Operation not (yet) supported on Windows", 9) if $^O eq 'MSWin32'; should both be $ENV{OS} eq "WNT" > solenv/bin/modules/Cvs.pm:85: if ($^O eq "MSWin32" || $^O eq "os2" ) { Should be $ENV{OS} eq "WNT" > solenv/bin/modules/CvsModule.pm:78:my $t_cvs_binary = ($^O eq 'MSWin32') ? 'cvsclt2.exe' : 'cvs.clt2'; Should be $ENV{OS} eq "WNT" > solenv/bin/cwsadd.pl:231: if ( $^O =~ "MSWin32" ) > solenv/bin/cwsadd.pl:484: if ( $^O =~ "MSWin32" ) An OS check is meant. > solenv/bin/cwsanalyze.pl:795: print_error("Operation not (yet) > supported on Windows", 9) if $^O eq 'MSWin32'; An OS check is meant. > solenv/bin/cwscreate.pl:275: if ( $^O eq 'MSWin32' ) { > solenv/bin/cwscreate.pl:298: $globalini = ( $^O eq 'MSWin32' ) Hamburg special, OS check Now the rest, I guess it is all hamburg environment related, and therefore no problem for OOo. > solenv/bin/setsolar.pl:280: if ( $^O eq 'MSWin32' ) { > solenv/bin/setsolar.pl:548: if ( $^O eq 'MSWin32' ) { OS check > solenv/bin/setsolar.pl:886: if ( $^O eq 'MSWin32' ) { 4nt check > solenv/bin/setsolar.pl:1150: if ( $^O eq 'MSWin32' ) { OK > solenv/bin/setsolar.pl:1490: if ( $^O eq 'MSWin32' ) { 4nt check > solenv/bin/setsolar.pl:1531: $globalini = ( $^O eq 'MSWin32' ) > solenv/bin/setsolar.pl:1702: if ( $^O eq 'MSWin32' ) { OS check > solenv/bin/setsolar.pl:1735: if ( $^O eq 'MSWin32' ) { 4nt+Activestate checks > solenv/bin/deliver.pl:225: $command =~ s#/#\\#g if $^O eq 'MSWin32'; OK > solenv/bin/deliver.pl:1023: $zipexe .= ' -y' unless $^O eq 'MSWin32'; Hmmm, I'm unsure here. zip -y obviously works with the cygwin zip, so the test should be changed to: $ENV{USE_SHELL} ne "4nt" but I'm not sure why the native zip shouldn't use "-y". I don't have that version here. > solenv/bin/modules/CreatePDBRelocators.pm:121: if ( $^O eq 'MSWin32' ) { Should be $ENV{OS} eq "WNT", or even $ENV{COM} eq "MSC" > solenv/bin/build.pl:111: if ( $^O eq 'MSWin32' ) { > solenv/bin/build.pl:542: if ( ($^O eq 'MSWin32') && (!defined $ENV{SHELL})) { > solenv/bin/build.pl:1387: if ( $^O eq 'MSWin32' ) { OK, but these imply 4nt. > solenv/bin/build.pl:1426: if ( $^O eq 'MSWin32' ) { ActiveState renames, unix deletes? > solenv/bin/build.pl:1713: if ( $^O eq 'MSWin32' ) { hamburg environment only, OS check > solenv/bin/build.pl:1747: if ( $^O eq 'MSWin32' ) { hamburg environment, really a 4nt check > solenv/bin/build.pl:1775: if ( $^O eq 'MSWin32' ) { ActiveState renames, unix deletes? > solenv/bin/build.pl:1792: if ( $^O eq 'MSWin32' ) { check for 4nt
Well, CWS tools work for W32-tcsh. So I close this issue. I'll open a new issue should I find a problem.
oops, still open...