summaryrefslogtreecommitdiff
path: root/Lib/test/test_fcntl.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-02 20:30:29 +0000
committerGuido van Rossum <guido@python.org>1997-12-02 20:30:29 +0000
commit344d07ffc4f2cf380d4cb698fad93168d22cf88c (patch)
tree46f7f33fa01eb140ef0027e3c30cc118d5469123 /Lib/test/test_fcntl.py
parentfaebc65a5b778f92cc441d7d0650373603a3e850 (diff)
downloadcpython-344d07ffc4f2cf380d4cb698fad93168d22cf88c.tar.gz
Support for netbsd1 and freebsd3, after suggestions by Anders Andersen
and Jacques Vidrine.
Diffstat (limited to 'Lib/test/test_fcntl.py')
-rwxr-xr-xLib/test/test_fcntl.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py
index a5ea1e678f..2ae6b993a5 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`