Remove odd practice of inverting error codes.

-EPERM is equal to ERESTART, returning which from ioctl() handler causes
infinite syscall restart.

MFC after:	2 weeks
Redefine SUNW based on SYSDIR in an attempt to fix a build problem.

MFC after:	2 weeks