Author: Philip Jenvey <pjen...@underboss.org> Branch: py3k Changeset: r84643:6abeeb543813 Date: 2016-05-23 14:48 -0700 http://bitbucket.org/pypy/pypy/changeset/6abeeb543813/
Log: handle #ifndef AT_FDCWD diff --git a/pypy/module/posix/interp_posix.py b/pypy/module/posix/interp_posix.py --- a/pypy/module/posix/interp_posix.py +++ b/pypy/module/posix/interp_posix.py @@ -166,7 +166,8 @@ def path_or_fd(allow_fd=True): return _PathOrFd if allow_fd else _JustPath -DEFAULT_DIR_FD = getattr(rposix, 'AT_FDCWD', -100) +_HAVE_AT_FDCWD = getattr(rposix, 'AT_FDCWD', None) is not None +DEFAULT_DIR_FD = rposix.AT_FDCWD if _HAVE_AT_FDCWD else -100 DIR_FD_AVAILABLE = False @specialize.arg(2) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit