Annotation of pkgsrc/lang/python21/patches/patch-bc, revision 1.3

1.3     ! joerg       1: $NetBSD: patch-bc,v 1.2 2005/05/29 11:07:49 minskim Exp $
1.1       recht       2: 
1.2       minskim     3: --- Lib/posixfile.py.orig      2001-04-10 10:44:33.000000000 -0500
                      4: +++ Lib/posixfile.py
                      5: @@ -171,11 +171,11 @@ class _posixfile_:
1.1       recht       6:          # Hack by davem@magnet.com to get locking to go on freebsd;
                      7:          # additions for AIX by Vladimir.Marangozov@imag.fr
                      8:          import sys, os
                      9: -        if sys.platform in ('netbsd1',
1.3     ! joerg      10: +        if sys.platform in ('netbsd1', 'netbsd2', 'netbsd3','dragonfly1',
1.1       recht      11:                              'openbsd2',
                     12:                              'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
                     13:                              'bsdos2', 'bsdos3', 'bsdos4'):
                     14: -            flock = struct.pack('lxxxxlxxxxlhh', \
                     15: +            flock = struct.pack('qqihh', \
                     16:                    l_start, l_len, os.getpid(), l_type, l_whence)
                     17:          elif sys.platform in ['aix3', 'aix4']:
                     18:              flock = struct.pack('hhlllii', \
1.2       minskim    19: @@ -187,12 +187,12 @@ class _posixfile_:
1.1       recht      20:          flock = fcntl.fcntl(self._file_.fileno(), cmd, flock)
                     21:  
                     22:          if '?' in how:
                     23: -            if sys.platform in ('netbsd1',
1.2       minskim    24: +            if sys.platform in ('netbsd1', 'netbsd2', 'netbsd3',
1.1       recht      25:                                  'openbsd2',
                     26:                                  'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
                     27:                                  'bsdos2', 'bsdos3', 'bsdos4'):
                     28:                  l_start, l_len, l_pid, l_type, l_whence = \
                     29: -                    struct.unpack('lxxxxlxxxxlhh', flock)
                     30: +                    struct.unpack('qqihh', flock)
                     31:              elif sys.platform in ['aix3', 'aix4']:
                     32:                  l_type, l_whence, l_start, l_len, l_sysid, l_pid, l_vfs = \
                     33:                      struct.unpack('hhlllii', flock)

CVSweb <webmaster@jp.NetBSD.org>