+.Pp
+.Sh ERRORS
+The
+.Fn setegid ,
+.Fn seteuid ,
+.Fn setgid ,
+and
+.Fn setuid
+system calls will fail if:
+.Bl -tag -width Er
+.\" ===========
+.It Bq Er EINVAL
+The value of the {group,user} ID argument is invalid
+and is not supported by the implementation.
+.\" ===========
+.It Bq Er EPERM
+The process does not have appropriate privileges and
+the ID argument
+does not match the real ID
+or the saved set-{group,user}-ID.
+.El
+.Sh LEGACY SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <unistd.h>
+.Pp
+The include file
+.In sys/types.h
+is necessary for all functions.