[pypy-commit] pypy default: fix translation on Macs

bivab noreply at buildbot.pypy.org
Fri Jun 22 17:37:41 CEST 2012


Author: David Schneider <david.schneider at picle.org>
Branch: 
Changeset: r55755:9daab4fb1be1
Date: 2012-06-22 17:36 +0200
http://bitbucket.org/pypy/pypy/changeset/9daab4fb1be1/

Log:	fix translation on Macs

diff --git a/pypy/rpython/module/ll_os.py b/pypy/rpython/module/ll_os.py
--- a/pypy/rpython/module/ll_os.py
+++ b/pypy/rpython/module/ll_os.py
@@ -133,18 +133,24 @@
     _WIN32 = True
 else:
     _WIN32 = False
-
 if _WIN32:
     underscore_on_windows = '_'
 else:
     underscore_on_windows = ''
 
+_DARWIN = sys.platform.startswith('darwin')
+
 includes = []
 if not _WIN32:
     # XXX many of these includes are not portable at all
     includes += ['dirent.h', 'sys/stat.h',
                  'sys/times.h', 'utime.h', 'sys/types.h', 'unistd.h',
-                 'signal.h', 'sys/wait.h', 'fcntl.h', 'pty.h']
+                 'signal.h', 'sys/wait.h', 'fcntl.h']
+    if _DARWIN:
+        includes += ['util.h']
+    else:
+        includes += ['pty.h']
+
 else:
     includes += ['sys/utime.h']
 


More information about the pypy-commit mailing list