summaryrefslogtreecommitdiffstats
path: root/Lib/posixfile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-02 20:30:29 (GMT)
committerGuido van Rossum <guido@python.org>1997-12-02 20:30:29 (GMT)
commit91221c29f285bfd1a0595ee7a5335f6e23e49579 (patch)
tree1d60a43c5fb3c7a34d6b107b55069d6ecadaebaf /Lib/posixfile.py
parentc0f29c2d31b9be8ffd60083e3724f90d13bd0cf4 (diff)
downloadcpython-91221c29f285bfd1a0595ee7a5335f6e23e49579.zip
cpython-91221c29f285bfd1a0595ee7a5335f6e23e49579.tar.gz
cpython-91221c29f285bfd1a0595ee7a5335f6e23e49579.tar.bz2
Support for netbsd1 and freebsd3, after suggestions by Anders Andersen
and Jacques Vidrine.
Diffstat (limited to 'Lib/posixfile.py')
-rw-r--r--Lib/posixfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/posixfile.py b/Lib/posixfile.py
index fc5f53f..d66517f 100644
--- a/Lib/posixfile.py
+++ b/Lib/posixfile.py
@@ -177,7 +177,7 @@ class _posixfile_:
# Hack by davem@magnet.com to get locking to go on freebsd;
# additions for AIX by Vladimir.Marangozov@imag.fr
import sys, os
- if sys.platform == 'freebsd2':
+ if sys.platform in ('netbsd1', 'freebsd2', 'freebsd3'):
flock = struct.pack('lxxxxlxxxxlhh', \
l_start, l_len, os.getpid(), l_type, l_whence)
elif sys.platform in ['aix3', 'aix4']:
@@ -190,7 +190,7 @@ class _posixfile_:
flock = fcntl.fcntl(self._file_.fileno(), cmd, flock)
if '?' in how:
- if sys.platform == 'freebsd2':
+ if sys.platform in ('netbsd1', 'freebsd2', 'freebsd3'):
l_start, l_len, l_pid, l_type, l_whence = \
struct.unpack('lxxxxlxxxxlhh', flock)
elif sys.platform in ['aix3', 'aix4']: