diff options
author | Guido van Rossum <guido@python.org> | 1997-12-09 16:56:41 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-09 16:56:41 (GMT) |
commit | b978d18fec0b583be415e20464e63f40bdc895da (patch) | |
tree | 448caa96dd1d74a303854f9568286b80ef485c4a /Lib/dos-8x3/test_fcn.py | |
parent | 3d20986d9664f9d6025b1f8e89fa4b3804c0cbd6 (diff) | |
download | cpython-b978d18fec0b583be415e20464e63f40bdc895da.zip cpython-b978d18fec0b583be415e20464e63f40bdc895da.tar.gz cpython-b978d18fec0b583be415e20464e63f40bdc895da.tar.bz2 |
Guess... :-)
Diffstat (limited to 'Lib/dos-8x3/test_fcn.py')
-rw-r--r-- | Lib/dos-8x3/test_fcn.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/dos-8x3/test_fcn.py b/Lib/dos-8x3/test_fcn.py index a5ea1e6..2ae6b99 100644 --- a/Lib/dos-8x3/test_fcn.py +++ b/Lib/dos-8x3/test_fcn.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` |