$NetBSD: patch-ab,v 1.32 2004/11/30 02:02:13 atatat Exp $ Incorporate a patch from the author that widens the NETBSDV definition to account for new current versioning system, properly handles the sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs support. --- dialects/n+obsd/dlsof.h.orig 2004-03-10 18:51:36.000000000 -0500 +++ dialects/n+obsd/dlsof.h @@ -98,9 +98,9 @@ struct uio; /* dummy for function protot #include #include -# if defined(NETBSDV) && NETBSDV>=1030 +# if defined(NETBSDV) && NETBSDV>=1003000 #define sockproto NETBSD_sockproto -# endif /* defined(NETBSDV) && NETBSDV>=1030 */ +# endif /* defined(NETBSDV) && NETBSDV>=1003000 */ #include @@ -145,9 +145,9 @@ struct nameidata; /* to satisfy a functi #include # endif /* defined(HASMSDOSFS) */ -# if defined(NETBSDV) && NETBSDV>=1030 +# if defined(NETBSDV) && NETBSDV>=1003000 #undef sockproto -# endif /* defined(NETBSDV) && NETBSDV>=1030 */ +# endif /* defined(NETBSDV) && NETBSDV>=1003000 */ #include #include @@ -202,7 +202,7 @@ struct nameidata; /* to satisfy a functi #include -# if defined(NETBSDV) && NETBSDV>=1030 +# if defined(NETBSDV) && NETBSDV>=1003000 /* * Because late in the 1.3I NetBSD development cycle the sockproto structure * was placed under _KERNEL in , and because defining _KERNEL @@ -217,7 +217,7 @@ struct sockproto { u_short sp_family; u_short sp_protocol; }; -# endif /* defined(NETBSDV) && NETBSDV>=1030 */ +# endif /* defined(NETBSDV) && NETBSDV>=1003000 */ #include #include @@ -245,6 +245,14 @@ struct sockproto { #undef DIRENT_DIRBLKSIZ # endif /*defined(DIRENT_BLKSIZ) */ +# if defined(HASBUFQ_H) +# if defined(NETBSDV) && NETBSDV>=2099010 +#define _KERNEL +#include +#undef _KERNEL +# endif /* defined(NETBSDV) && NETBSDV>=2099010 */ +#endif /* defined(HASBUFQ_H) */ + #undef KERNEL #include @@ -331,9 +339,9 @@ struct sockproto { # if defined(HASNULLFS) #define _KERNEL -# if defined(NETBSDV) && NETBSDV>=1050 && __NetBSD_Version__<106060000 +# if defined(NETBSDV) && NETBSDV>=1005000 && __NetBSD_Version__<106060000 #include "netexport.h" -# endif /* defined(NETBSDV) && NETBSDV>=1050 +# endif /* defined(NETBSDV) && NETBSDV>=1005000 && __NetBSD_Version__<106060000 */ #include #undef _KERNEL @@ -357,10 +365,26 @@ struct sockproto { #define Pstatus PFSstatus #define Pnote PFSnote #define Pnotepg PFSnotepg +# if defined(NetBSDV) +# if NETBSDV>=2000000 +#define Pfd PFSfd +# endif /* NETBSDV>=2000000 */ +# if NETBSDV>=1006000 +#define Pmap PFSmap +#define Pmaps PFSmaps +# endif /* NETBSDV>=1006000 */ +# endif /* defined(NetBSDV) */ # endif /* defined(HASPROCFS_PFSROOT) */ #include # endif /* defined(HASPROCFS) */ +# if defined(HASPTYFS) +#define _KERNEL +#include +#include +#undef _KERNEL +# endif /* defined(HASPTYFS) */ + #define KERNEL #define _KERNEL #include @@ -515,9 +539,9 @@ struct sfile { */ # if defined(HASNCACHE) -# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) +# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) #include -#endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */ +#endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ #include #include @@ -527,15 +551,15 @@ struct sfile { #define NCACHE_NODEADDR nc_vp /* node address in NCACHE */ #define NCACHE_PARADDR nc_dvp /* parent node address in NCACHE */ -# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) +# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) #define NCACHE_NXT nc_hash.le_next /* link in NCACHE */ -# else /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */ +# else /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ # if defined(NetBSD1_0) && NetBSD<1994101 #define NCACHE_NXT nc_nxt /* link in NCACHE */ # else /* !defined(NetBSD1_0) || NetBSD>=1994101 */ #define NCACHE_NXT nc_lru.tqe_next /* link in NCACHE */ # endif /* defined(NetBSD1_0) && NetBSD<1994101 */ -# endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */ +# endif /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ # if defined(HASNCVPID) #define NCACHE_PARID nc_dvpid /* parent node ID in NCACHE */