Annotation of pkgsrc/sysutils/lsof/patches/patch-ab, revision 1.32

1.32    ! atatat      1: $NetBSD: patch-ab,v 1.31 2004/11/28 22:39:07 atatat Exp $
1.31      atatat      2: 
                      3: Incorporate a patch from the author that widens the NETBSDV definition
                      4: to account for new current versioning system, properly handles the
                      5: sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs
                      6: support.
1.10      atatat      7: 
1.30      kim         8: --- dialects/n+obsd/dlsof.h.orig       2004-03-10 18:51:36.000000000 -0500
1.31      atatat      9: +++ dialects/n+obsd/dlsof.h
                     10: @@ -98,9 +98,9 @@ struct uio;  /* dummy for function protot
                     11:  #include <rpc/types.h>
                     12:  #include <sys/protosw.h>
                     13:  
                     14: -# if  defined(NETBSDV) && NETBSDV>=1030
                     15: +# if  defined(NETBSDV) && NETBSDV>=1003000
                     16:  #define       sockproto       NETBSD_sockproto
                     17: -# endif       /* defined(NETBSDV) && NETBSDV>=1030 */
                     18: +# endif       /* defined(NETBSDV) && NETBSDV>=1003000 */
                     19:  
                     20:  #include <sys/socket.h>
                     21:  
                     22: @@ -145,9 +145,9 @@ struct nameidata;  /* to satisfy a functi
                     23:  #include <msdosfs/denode.h>
                     24:  # endif       /* defined(HASMSDOSFS) */
                     25:  
                     26: -# if  defined(NETBSDV) && NETBSDV>=1030
                     27: +# if  defined(NETBSDV) && NETBSDV>=1003000
                     28:  #undef        sockproto
                     29: -# endif       /* defined(NETBSDV) && NETBSDV>=1030 */
                     30: +# endif       /* defined(NETBSDV) && NETBSDV>=1003000 */
                     31:  
                     32:  #include <sys/socketvar.h>
                     33:  #include <sys/un.h>
                     34: @@ -202,7 +202,7 @@ struct nameidata;  /* to satisfy a functi
                     35:  
                     36:  #include <sys/vnode.h>
                     37:  
                     38: -# if  defined(NETBSDV) && NETBSDV>=1030
                     39: +# if  defined(NETBSDV) && NETBSDV>=1003000
                     40:  /*
                     41:   * Because late in the 1.3I NetBSD development cycle the sockproto structure
                     42:   * was placed under _KERNEL in <sys/socket.h>, and because defining _KERNEL
                     43: @@ -217,7 +217,7 @@ struct sockproto {
                     44:        u_short sp_family;
                     45:        u_short sp_protocol;
                     46:  };
                     47: -# endif       /* defined(NETBSDV) && NETBSDV>=1030 */
                     48: +# endif       /* defined(NETBSDV) && NETBSDV>=1003000 */
                     49:  
                     50:  #include <net/raw_cb.h>
                     51:  #include <sys/domain.h>
                     52: @@ -245,6 +245,14 @@ struct sockproto {
1.30      kim        53:  #undef        DIRENT_DIRBLKSIZ
                     54:  # endif       /*defined(DIRENT_BLKSIZ) */
                     55:  
1.31      atatat     56: +# if  defined(HASBUFQ_H)
                     57: +#  if defined(NETBSDV) && NETBSDV>=2099010
1.30      kim        58: +#define       _KERNEL
                     59: +#include <sys/bufq.h>
                     60: +#undef        _KERNEL
1.31      atatat     61: +#  endif      /* defined(NETBSDV) && NETBSDV>=2099010 */
                     62: +#endif        /* defined(HASBUFQ_H) */
                     63: +
1.30      kim        64:  #undef KERNEL
                     65:  #include <ufs/mfs/mfsnode.h>
1.28      atatat     66:  
1.31      atatat     67: @@ -331,9 +339,9 @@ struct sockproto {
                     68:  
                     69:  # if  defined(HASNULLFS)
                     70:  #define       _KERNEL
                     71: -#  if defined(NETBSDV) && NETBSDV>=1050 && __NetBSD_Version__<106060000
                     72: +#  if defined(NETBSDV) && NETBSDV>=1005000 && __NetBSD_Version__<106060000
                     73:  #include "netexport.h"
                     74: -#  endif      /* defined(NETBSDV) && NETBSDV>=1050
                     75: +#  endif      /* defined(NETBSDV) && NETBSDV>=1005000
                     76:                   && __NetBSD_Version__<106060000 */
                     77:  #include <miscfs/nullfs/null.h>
                     78:  #undef        _KERNEL
1.32    ! atatat     79: @@ -357,10 +365,26 @@ struct sockproto {
1.31      atatat     80:  #define       Pstatus         PFSstatus
                     81:  #define       Pnote           PFSnote
                     82:  #define       Pnotepg         PFSnotepg
1.32    ! atatat     83: +#   if        defined(NetBSDV)
        !            84: +#    if       NETBSDV>=2000000
1.31      atatat     85: +#define       Pfd             PFSfd
1.32    ! atatat     86: +#    endif    /* NETBSDV>=2000000 */
        !            87: +#    if       NETBSDV>=1006000
1.31      atatat     88: +#define       Pmap            PFSmap
                     89: +#define       Pmaps           PFSmaps
1.32    ! atatat     90: +#    endif    /* NETBSDV>=1006000 */
        !            91: +#   endif     /* defined(NetBSDV) */
1.31      atatat     92:  #  endif      /* defined(HASPROCFS_PFSROOT) */
                     93:  #include <machine/reg.h>
                     94:  # endif       /* defined(HASPROCFS) */
                     95:  
                     96: +# if  defined(HASPTYFS)
                     97: +#define       _KERNEL
                     98: +#include <fs/ptyfs/ptyfs.h>
                     99: +#include <miscfs/specfs/specdev.h>
                    100: +#undef        _KERNEL
                    101: +# endif       /* defined(HASPTYFS) */
                    102: +
                    103:  #define       KERNEL
                    104:  #define _KERNEL
                    105:  #include <sys/file.h>
1.32    ! atatat    106: @@ -515,9 +539,9 @@ struct sfile {
1.31      atatat    107:   */
                    108:  
                    109:  # if     defined(HASNCACHE)
                    110: -#  if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020)
                    111: +#  if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000)
                    112:  #include <stddef.h>
                    113: -#endif        /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */
                    114: +#endif        /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */
                    115:  
                    116:  #include <sys/uio.h>
                    117:  #include <sys/namei.h>
1.32    ! atatat    118: @@ -527,15 +551,15 @@ struct sfile {
1.31      atatat    119:  #define       NCACHE_NODEADDR nc_vp           /* node address in NCACHE */
                    120:  #define       NCACHE_PARADDR  nc_dvp          /* parent node address in NCACHE */
                    121:  
                    122: -#  if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020)
                    123: +#  if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000)
                    124:  #define       NCACHE_NXT      nc_hash.le_next /* link in NCACHE */
                    125: -#  else       /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */
                    126: +#  else       /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */
                    127:  #   if        defined(NetBSD1_0) && NetBSD<1994101
                    128:  #define       NCACHE_NXT      nc_nxt          /* link in NCACHE */
                    129:  #   else      /* !defined(NetBSD1_0) || NetBSD>=1994101 */
                    130:  #define       NCACHE_NXT      nc_lru.tqe_next /* link in NCACHE */
                    131:  #   endif     /* defined(NetBSD1_0) && NetBSD<1994101 */
                    132: -#  endif      /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */
                    133: +#  endif      /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */
                    134:  
                    135:  #  if defined(HASNCVPID)
                    136:  #define       NCACHE_PARID    nc_dvpid        /* parent node ID in NCACHE */

CVSweb <webmaster@jp.NetBSD.org>