[klibc] sys/sysmacros.h: define major, minor, and makedev as macros

There seems to exist programs in the field that assume major(),
minor() and makedev() are argument-taking macros, resulting in
monstrosities like:

	int major, minor;

	major = major(st.st_rdev);
	minor = minor(st.st_rdev);

Although such code really should clean their house, in the interest of
minimizing porting friction define major, minor and makedev as macros.

While we are at it, clean up the type handling in the pure macro
versions.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
1 file changed