| Index: build/download_utils.py | 
| =================================================================== | 
| --- build/download_utils.py	(revision 4818) | 
| +++ build/download_utils.py	(working copy) | 
| @@ -30,12 +30,27 @@ | 
| 'mac': 'mac', | 
| } | 
|  | 
| +ARCH_COLLAPSE = { | 
| +    'i386'  : 'x86-32', | 
| +    'i686'  : 'x86-32', | 
| +    'x86_64': 'x86-64', | 
| +} | 
|  | 
| + | 
| def PlatformName(name=None): | 
| if name is None: | 
| name = sys.platform | 
| return PLATFORM_COLLAPSE[name] | 
|  | 
| +def ArchName(name=None): | 
| +  if name is None: | 
| +    if PlatformName() == 'windows': | 
| +      # TODO(pdox): Figure out how to auto-detect 32-bit vs 64-bit Windows. | 
| +      name = 'i386' | 
| +    else: | 
| +      import platform | 
| +      name = platform.machine() | 
| +  return ARCH_COLLAPSE[name] | 
|  | 
| def EnsureFileCanBeWritten(filename): | 
| directory = os.path.dirname(filename) | 
| @@ -125,4 +140,4 @@ | 
|  | 
| def RemoveFile(path): | 
| if os.path.exists(path): | 
| -    Retry(os.unlink, path) | 
| +    Retry(os.unlink, path) | 
|  |