tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Not exporting MACHINE and MACHINE_ARCH from <machine/param.h>



Currently we export MACHINE and MACHINE_ARCH from <machine/param.h>
which is included from <sys/param.h>.

I think we shouldn't relay on those and should instead rely on sysctl 
(directly or indirectly [uname]) to fetch hw.machine or hw.machine_arch, 
respectively.

We have a lot of programs that use (or used) MACHINE_ARCH and those
should be changed to use sysctl.

This is similar to NBPG/PAGE_SIZE .vs. sysconf(_SC_PAGESIZE)

I have a diff for <arm/params.h> at

        http://www.netbsd.org/~matt/arm-param-diff.txt

but it can't handle the earmv5{,hf}{,eb} case since to the toolchain
that looks identical to earm{,hf}{,eb}.




Home | Main Index | Thread Index | Old Index