Prep .c files for removing the #includes from */archdep.h
authorguenther <guenther@openbsd.org>
Sat, 8 Jan 2022 06:49:41 +0000 (06:49 +0000)
committerguenther <guenther@openbsd.org>
Sat, 8 Jan 2022 06:49:41 +0000 (06:49 +0000)
commitb722ba42570161220f25c5d789b5bec8a0166743
treed62621a6b4b47a18fc753655851b1cd89a5d22cb
parent38ab7229863bb34c355cdb9d78bc437e1b88a586
Prep .c files for removing the #includes from */archdep.h
 * replace #include "archdep.h" with #includes of what is used, pulling in
   "syscall.h", "util.h", and "archdep.h" as needed
 * delete #include <sys/syscall.h> from syscall.h
 * only pull in <sys/stat.h> to the three files that use _dl_fstat(),
   forward declare struct stat in syscall.h for the others
 * NBBY is for <sys/select.h> macros; just use '8' in dl_printf.c
 * <machine/vmparam.h> is only needed on i386; conditionalize it
 * stop using __LDPGSZ: use _MAX_PAGE_SHIFT (already used by malloc.c)
   where necessary
 * delete other bogus #includes, order legit per style: <sys/*> then
   <*/*>, then <*>, then "*"

dir.c improvement from jsg@
ok and testing assistance deraadt@
34 files changed:
libexec/ld.so/aarch64/rtld_machine.c
libexec/ld.so/alpha/rtld_machine.c
libexec/ld.so/amd64/rtld_machine.c
libexec/ld.so/arm/rtld_machine.c
libexec/ld.so/boot.c
libexec/ld.so/dir.c
libexec/ld.so/dl_dirname.c
libexec/ld.so/dl_printf.c
libexec/ld.so/dl_uname.c
libexec/ld.so/dlfcn.c
libexec/ld.so/hppa/rtld_machine.c
libexec/ld.so/i386/rtld_machine.c
libexec/ld.so/ldconfig/ld.h
libexec/ld.so/library.c
libexec/ld.so/library_mquery.c
libexec/ld.so/library_subr.c
libexec/ld.so/loader.c
libexec/ld.so/m88k/rtld_machine.c
libexec/ld.so/malloc.c
libexec/ld.so/mips64/rtld_machine.c
libexec/ld.so/powerpc/rtld_machine.c
libexec/ld.so/powerpc64/rtld_machine.c
libexec/ld.so/reallocarray.c
libexec/ld.so/resolve.c
libexec/ld.so/riscv64/rtld_machine.c
libexec/ld.so/sh/rtld_machine.c
libexec/ld.so/sod.c
libexec/ld.so/sparc64/rtld_machine.c
libexec/ld.so/strtol.c
libexec/ld.so/syscall.h
libexec/ld.so/tib.c
libexec/ld.so/trace.c
libexec/ld.so/util.c
libexec/ld.so/util.h