diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-10-18 22:07:48 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-10-18 22:07:48 (GMT) |
commit | a660a34844f55dc2400a6ef6f2055b239b0aede7 (patch) | |
tree | a64823eb0b72db1a69e824ebe6fbc6b48bb7c867 /Lib | |
parent | 4fe3c273233ced82cb7443f0ec4caea5a8836df1 (diff) | |
download | cpython-a660a34844f55dc2400a6ef6f2055b239b0aede7.zip cpython-a660a34844f55dc2400a6ef6f2055b239b0aede7.tar.gz cpython-a660a34844f55dc2400a6ef6f2055b239b0aede7.tar.bz2 |
Assume a 64-bit start and len if O_LARGEFILE is available.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/test/test_fcntl.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py index a64a5e1..e446249 100755 --- a/Lib/test/test_fcntl.py +++ b/Lib/test/test_fcntl.py @@ -9,6 +9,13 @@ from test_support import verbose, TESTFN filename = TESTFN +try: + os.O_LARGEFILE +except AttributeError: + start_len = "ll" +else: + start_len = "qq" + if sys.platform in ('netbsd1', 'Darwin1.2', 'darwin1', 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'bsdos2', 'bsdos3', 'bsdos4', @@ -17,7 +24,7 @@ if sys.platform in ('netbsd1', 'Darwin1.2', 'darwin1', elif sys.platform in ['aix3', 'aix4', 'hp-uxB', 'unixware7']: 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) + lockdata = struct.pack('hh'+start_len+'hh', fcntl.F_WRLCK, 0, 0, 0, 0, 0) if verbose: print 'struct.pack: ', `lockdata` |