Make sure we identify cygwin systems and set environment defaults correctly.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 28 Jun 2002 16:20:59 +0000 (16:20 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 28 Jun 2002 16:20:59 +0000 (16:20 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@398 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Platform/__init__.py

index 42b2607205e65dfc67532c7fc055331b4d32e235..8a56b09961996e7d404a42729314d6fa3df7cbd4 100644 (file)
@@ -52,14 +52,17 @@ import SCons.Errors
 
 def platform_default():
     """Return the platform string for our execution environment.
+
+    The returned value should map to one of the SCons/Platform/*.py
+    files.  Since we're architecture independent, though, we don't
+    care about the machine architecture.
     """
-    if sys.platform == 'win32':
-        return 'win32'
-    if os.name == 'cygwin':
-        return 'cygwin'
     if os.name == 'posix':
-        return 'posix'
-    return None
+        if sys.platform == 'cygwin':
+            return 'cygwin'
+       return 'posix'
+    else:
+        return sys.platform
 
 def platform_module(name = platform_default()):
     """Return the imported module for the platform.