[Python-checkins] CVS: python/dist/src/Lib/test test_fcntl.py,1.18,1.19

Martin v. L?wis loewis@users.sourceforge.net
Thu, 18 Oct 2001 15:07:51 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv31426

Modified Files:
	test_fcntl.py 
Log Message:
Assume a 64-bit start and len if O_LARGEFILE is available.


Index: test_fcntl.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_fcntl.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** test_fcntl.py	2001/05/09 21:11:59	1.18
--- test_fcntl.py	2001/10/18 22:07:48	1.19
***************
*** 10,13 ****
--- 10,20 ----
  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',
***************
*** 18,22 ****
      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`
--- 25,29 ----
      lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
  else:
!     lockdata = struct.pack('hh'+start_len+'hh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)
  if verbose:
      print 'struct.pack: ', `lockdata`