On Sat, Aug 06 2022, Sebastien Marie <[email protected]> wrote: > On Sat, Aug 06, 2022 at 02:19:31AM +0200, Jeremie Courreges-Anglas wrote: >> On Fri, Aug 05 2022, Sebastien Marie <[email protected]> wrote: >> > Hi, >> > >> > When initially ported blist from DragonFlyBSD, we used custom type bsblk_t >> > and >> > bsbmp_t instead of the one used by DragonFlyBSD (swblk_t and u_swblk_t). >> > >> > The reason was swblk_t is already defined on OpenBSD, and was incompatible >> > with >> > blist (int32_t). It is defined, but not used (outside some regress file >> > which >> > seems to be not affected by type change). >> > >> > This diff changes the __swblk_t definition in sys/_types.h to be 'unsigned >> > long', and switch back blist to use swblk_t (and u_swblk_t, even if it >> > isn't >> > 'unsigned swblk_t'). >> > >> > It makes the diff with DragonFlyBSD more thin. I added a comment with the >> > git id >> > used for the initial port. >> > >> > I tested it on i386 and amd64 (kernel and userland). >> > >> > By changing bitmap type from 'u_long' to 'u_swblk_t' ('u_int64_t'), it >> > makes the >> > regress the same on 64 and 32bits archs (and it success on both). >> > >> > Comments or OK ? >> >> This seems fair, but maybe we should just zap the type from sys/types.h and >> define it only in sys/blist.h, as done in DragonflyBSD? > > Yes, it makes lot of sense. > > Updated diff below. > >> I'm building a release on amd64 with the type removed (also from >> regress). I don't expect fallout in ports (and I can take care of it if >> there is any). > > I also have a release building on i386. > > Thanks.
As expected, make release passes on amd64, with the diff below which also includes the regress bits. Feel free to commit it (ok jca@) before your blist changes (which I won't review today, EBUSY). Index: sys/sys/_types.h =================================================================== RCS file: /home/cvs/src/sys/sys/_types.h,v retrieving revision 1.9 diff -u -p -r1.9 _types.h --- sys/sys/_types.h 22 Aug 2014 23:05:15 -0000 1.9 +++ sys/sys/_types.h 6 Aug 2022 00:02:30 -0000 @@ -60,7 +60,6 @@ typedef __uint8_t __sa_family_t; /* sock typedef __int32_t __segsz_t; /* segment size */ typedef __uint32_t __socklen_t; /* length type for network syscalls */ typedef long __suseconds_t; /* microseconds (signed) */ -typedef __int32_t __swblk_t; /* swap offset */ typedef __int64_t __time_t; /* epoch time */ typedef __int32_t __timer_t; /* POSIX timer identifiers */ typedef __uint32_t __uid_t; /* user id */ Index: sys/sys/types.h =================================================================== RCS file: /home/cvs/src/sys/sys/types.h,v retrieving revision 1.48 diff -u -p -r1.48 types.h --- sys/sys/types.h 9 Feb 2019 04:54:11 -0000 1.48 +++ sys/sys/types.h 6 Aug 2022 00:02:41 -0000 @@ -144,7 +144,6 @@ typedef __mode_t mode_t; /* permissions typedef __nlink_t nlink_t; /* link count */ typedef __rlim_t rlim_t; /* resource limit */ typedef __segsz_t segsz_t; /* segment size */ -typedef __swblk_t swblk_t; /* swap offset */ typedef __uid_t uid_t; /* user id */ typedef __useconds_t useconds_t; /* microseconds */ typedef __suseconds_t suseconds_t; /* microseconds (signed) */ Index: regress/misc/c++abi/nm1.C =================================================================== RCS file: /home/cvs/src/regress/misc/c++abi/nm1.C,v retrieving revision 1.2 diff -u -p -r1.2 nm1.C --- regress/misc/c++abi/nm1.C 7 Feb 2017 12:57:12 -0000 1.2 +++ regress/misc/c++abi/nm1.C 5 Aug 2022 23:58:59 -0000 @@ -23,7 +23,6 @@ D(sa_family_t) D(segsz_t) D(socklen_t) D(suseconds_t) -D(swblk_t) D(uid_t) D(uint64_t) D(uint32_t) Index: regress/misc/c++abi/nm1.ref =================================================================== RCS file: /home/cvs/src/regress/misc/c++abi/nm1.ref,v retrieving revision 1.3 diff -u -p -r1.3 nm1.ref --- regress/misc/c++abi/nm1.ref 29 Oct 2013 03:00:40 -0000 1.3 +++ regress/misc/c++abi/nm1.ref 5 Aug 2022 23:59:47 -0000 @@ -18,7 +18,6 @@ sa_family_t(unsigned char) segsz_t(int) socklen_t(unsigned int) suseconds_t(long) -swblk_t(int) uid_t(unsigned int) uint64_t(unsigned long long) uint32_t(unsigned int) -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
