git: <sys/types.h>: Reduce vm_* types pollution in userland.

Rimvydas Jasinskas zrj at crater.dragonflybsd.org
Thu Nov 14 05:41:43 PST 2019


commit 034f8e5c233d21a5b7f8b8c37770532813d3d8ed
Author: zrj <rimvydas.jasinskas at gmail.com>
Date:   Mon Nov 11 19:40:49 2019 +0200

    <sys/types.h>: Reduce vm_* types pollution in userland.
    
     Userland should not be using these types outside kernel structures or
     <vm/*.h> scope.  Adjust several userland and boot code sources to
     include <machine/types.h> where they use them (mainly for vm_offset_t).
     * sys/fbio.h: Used in several world utilities and libvgl.
     * sys/kinfo.h: Use size_t for kp_vm_map_size (header used in userland).
     * sys/emulation/ndis/pe_var.h: Used in ndiscvt(8).
     * bus/firewire/fwcrom.c: Compiled directly in fwcontrol(8).
     * mptable(1): include <machine/types.h>, should really not be using
       vm_offset_t and looks to be suspiciously broken.
     * sys/boot: For now include <machine/types.h> for vm_offset_t in
       several headers, should really not be using vm types.
    
     Rest of world utilities get vm types through <sys/user.h>.
    
     While there, move pthread type inclusion to the very end of the source,
     doing so improves readability of compiler intermediates a lot.
    
     Strictly visibility changes only.

Summary of changes:
 sys/boot/common/bootstrap.h      |  1 +
 sys/boot/efi/loader/loader_efi.h |  1 +
 sys/boot/pc32/btx/lib/btxv86.h   |  2 +-
 sys/boot/pc32/libi386/libi386.h  |  1 +
 sys/bus/firewire/fwcrom.c        |  1 +
 sys/emulation/ndis/pe_var.h      |  2 ++
 sys/sys/fbio.h                   |  1 +
 sys/sys/kinfo.h                  |  4 ++--
 sys/sys/types.h                  | 12 ++++++------
 usr.sbin/mptable/mptable.c       |  2 +-
 10 files changed, 17 insertions(+), 10 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/034f8e5c233d21a5b7f8b8c37770532813d3d8ed


-- 
DragonFly BSD source repository


More information about the Commits mailing list