Commit 2d218632 authored by Guido van Rossum's avatar Guido van Rossum

Add support for FreeBSD-[45].

-- tg@FreeBSD.org
parent e504c0c2
...@@ -176,7 +176,7 @@ class _posixfile_: ...@@ -176,7 +176,7 @@ class _posixfile_:
import sys, os import sys, os
if sys.platform in ('netbsd1', if sys.platform in ('netbsd1',
'openbsd2', 'openbsd2',
'freebsd2', 'freebsd3', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
'bsdos2', 'bsdos3', 'bsdos4'): 'bsdos2', 'bsdos3', 'bsdos4'):
flock = struct.pack('lxxxxlxxxxlhh', \ flock = struct.pack('lxxxxlxxxxlhh', \
l_start, l_len, os.getpid(), l_type, l_whence) l_start, l_len, os.getpid(), l_type, l_whence)
...@@ -192,7 +192,7 @@ class _posixfile_: ...@@ -192,7 +192,7 @@ class _posixfile_:
if '?' in how: if '?' in how:
if sys.platform in ('netbsd1', if sys.platform in ('netbsd1',
'openbsd2', 'openbsd2',
'freebsd2', 'freebsd3', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
'bsdos2', 'bsdos3', 'bsdos4'): 'bsdos2', 'bsdos3', 'bsdos4'):
l_start, l_len, l_pid, l_type, l_whence = \ l_start, l_len, l_pid, l_type, l_whence = \
struct.unpack('lxxxxlxxxxlhh', flock) struct.unpack('lxxxxlxxxxlhh', flock)
......
...@@ -17,7 +17,7 @@ if verbose: ...@@ -17,7 +17,7 @@ if verbose:
print 'Status from fnctl with O_NONBLOCK: ', rv print 'Status from fnctl with O_NONBLOCK: ', rv
if sys.platform in ('netbsd1', if sys.platform in ('netbsd1',
'freebsd2', 'freebsd3', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
'bsdos2', 'bsdos3', 'bsdos4', 'bsdos2', 'bsdos3', 'bsdos4',
'openbsd', 'openbsd2'): 'openbsd', 'openbsd2'):
lockdata = struct.pack('lxxxxlxxxxlhh', 0, 0, 0, FCNTL.F_WRLCK, 0) lockdata = struct.pack('lxxxxlxxxxlhh', 0, 0, 0, FCNTL.F_WRLCK, 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment