diff options
author | Guido van Rossum <guido@python.org> | 1997-12-02 20:30:29 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-02 20:30:29 (GMT) |
commit | 91221c29f285bfd1a0595ee7a5335f6e23e49579 (patch) | |
tree | 1d60a43c5fb3c7a34d6b107b55069d6ecadaebaf /Lib/test/test_fcntl.py | |
parent | c0f29c2d31b9be8ffd60083e3724f90d13bd0cf4 (diff) | |
download | cpython-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/test/test_fcntl.py')
-rwxr-xr-x | Lib/test/test_fcntl.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py index a5ea1e6..2ae6b99 100755 --- a/Lib/test/test_fcntl.py +++ b/Lib/test/test_fcntl.py @@ -5,7 +5,7 @@ import struct import fcntl import FCNTL -import os +import os, sys from test_support import verbose filename = '/tmp/delete-me' @@ -16,7 +16,12 @@ rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, os.O_NONBLOCK) if verbose: print 'Status from fnctl with O_NONBLOCK: ', rv -lockdata = struct.pack('hhllhh', FCNTL.F_WRLCK, 0, 0, 0, 0, 0) +if sys.platform in ('netbsd1', 'freebsd2', 'freebsd3'): + lockdata = struct.pack('lxxxxlxxxxlhh', 0, 0, 0, FCNTL.F_WRLCK, 0) +elif sys.platform in ['aix3', 'aix4']: + lockdata = struct.pack('hhlllii', FCNTL.F_WRLCK, 0, 0, 0, 0, 0, 0) +else: + lockdata = struct.pack('hhllhh', FCNTL.F_WRLCK, 0, 0, 0, 0, 0) if verbose: print 'struct.pack: ', `lockdata` |