diff options
author | Matthew Dempsky <mdempsky@google.com> | 2013-05-01 18:03:27 (GMT) |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2013-05-01 18:09:38 (GMT) |
commit | 65a58e37a7dd48cb336668351d1cab3db0e4d5fe (patch) | |
tree | 7c3658339ed087b0d9d078a37867b81be3dc372a /platform_helper.py | |
parent | 4c552c2c3cbc07acce9c1a379fee054a3f680100 (diff) | |
download | Ninja-65a58e37a7dd48cb336668351d1cab3db0e4d5fe.zip Ninja-65a58e37a7dd48cb336668351d1cab3db0e4d5fe.tar.gz Ninja-65a58e37a7dd48cb336668351d1cab3db0e4d5fe.tar.bz2 |
Add support for OpenBSD.
Use ppoll() on OpenBSD. Also, fix interrupt handling to recognize
that on FreeBSD and OpenBSD, an interrupt might have been delivered
even if pselect()/ppoll() don't return -1/EINTR.
Diffstat (limited to 'platform_helper.py')
-rw-r--r-- | platform_helper.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform_helper.py b/platform_helper.py index 052c969..cd7298b 100644 --- a/platform_helper.py +++ b/platform_helper.py @@ -18,7 +18,7 @@ import sys def platforms(): - return ['linux', 'freebsd', 'solaris', 'sunos5', 'mingw', 'msvc'] + return ['linux', 'freebsd', 'openbsd', 'solaris', 'sunos5', 'mingw', 'msvc'] class Platform( object ): def __init__( self, platform): @@ -30,6 +30,8 @@ class Platform( object ): self._platform = 'linux' elif self._platform.startswith('freebsd'): self._platform = 'freebsd' + elif self._platform.startswith('openbsd'): + self._platform = 'openbsd' elif self._platform.startswith('solaris'): self._platform = 'solaris' elif self._platform.startswith('mingw'): @@ -59,5 +61,8 @@ class Platform( object ): def is_freebsd(self): return self._platform == 'freebsd' + def is_openbsd(self): + return self._platform == 'openbsd' + def is_sunos5(self): return self._platform == 'sunos5' |