create new tag
, view all tags

Bug: OsDetectionFailsOnMacOSX

The new release of TWiki has code in TWiki.cfg that attempts to determine the server's operating system. On MacOSX this is incorrectly determined to be "WINDOWS", which causes failures in (at least) the RCS interface.

Test case

Fix record

In TWiki.cfg, the OS-detection code attempts to get the value of $^O with the OS identifier. On MacOSX this properly returns "darwin". However, code following this incorrectly replaces that value with "WINDOWS" because of a spurious regexp match against the pattern /Win/i.

To correct the defect, change the clause around line 84 from:

if ($OS=~/Win/i) {
  $OS = 'WINDOWS';
} elsif ($OS=~/vms/i) {
if ($OS=~/darwin/i) {
  $OS = 'UNIX';
} elsif ($OS=~/Win/i) {
  $OS = 'WINDOWS';
} elsif ($OS=~/vms/i) {

Note that the test for "darwin" must precede the test for "Win".


TWiki version: 20010901
TWiki plugins: default
Server OS: MacOS X 10.0.4 (darwin)
Web server: Apache
Perl version: 5.6.0
Client OS: n/a
Web Browser: n/a

-- ToddJonker - 26 Sep 2001

Updated in CVS. The code came from CGI.pm, I guess my version had caught up with Darwin. Interesting that Darwin contains windows!

-- JohnTalintyre - 27 Sep 2001

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-02-15 - SamHasler
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.