summaryrefslogtreecommitdiffstats
path: root/Lib/dos-8x3/posixfil.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-26 18:33:32 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-26 18:33:32 (GMT)
commita8763e54ff25a226e50b281671189382fd3c324c (patch)
treebea9ea9a9f5bb33cbdfef607b4a8ce5e6197e98b /Lib/dos-8x3/posixfil.py
parent52a42fe9e706fb51ec608571c2b60e7694a5d0a2 (diff)
downloadcpython-a8763e54ff25a226e50b281671189382fd3c324c.zip
cpython-a8763e54ff25a226e50b281671189382fd3c324c.tar.gz
cpython-a8763e54ff25a226e50b281671189382fd3c324c.tar.bz2
Another batch of updates...
Diffstat (limited to 'Lib/dos-8x3/posixfil.py')
-rwxr-xr-xLib/dos-8x3/posixfil.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/dos-8x3/posixfil.py b/Lib/dos-8x3/posixfil.py
index 64cda98..f0df543 100755
--- a/Lib/dos-8x3/posixfil.py
+++ b/Lib/dos-8x3/posixfil.py
@@ -174,11 +174,15 @@ class _posixfile_:
elif len(args) > 3:
raise TypeError, 'too many arguments'
- # Hack by davem@magnet.com to get locking to go on freebsd
+ # 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':
flock = struct.pack('lxxxxlxxxxlhh', \
l_start, l_len, os.getpid(), l_type, l_whence)
+ elif sys.platform in ['aix3', 'aix4']:
+ flock = struct.pack('hhlllii', \
+ l_type, l_whence, l_start, l_len, 0, 0, 0)
else:
flock = struct.pack('hhllhh', \
l_type, l_whence, l_start, l_len, 0, 0)
@@ -189,6 +193,9 @@ class _posixfile_:
if sys.platform == 'freebsd2':
l_start, l_len, l_pid, l_type, l_whence = \
struct.unpack('lxxxxlxxxxlhh', flock)
+ elif sys.platform in ['aix3', 'aix4']:
+ l_type, l_whence, l_start, l_len, l_sysid, l_pid, l_vfs = \
+ struct.unpack('hhlllii', flock)
else:
l_type, l_whence, l_start, l_len, l_sysid, l_pid = \
struct.unpack('hhllhh', flock)