.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.In sys/types.h
.In unistd.h
.Ft pid_t
-.Fn tcgetpgrp "int fd"
+.Fo tcgetpgrp
+.Fa "int fildes"
+.Fc
.Sh DESCRIPTION
The
.Fn tcgetpgrp
.Bl -tag -width Er
.It Bq Er EBADF
The
-.Fa fd
+.Fa fildes
argument is not a valid file descriptor.
.It Bq Er ENOTTY
The calling process does not have a controlling terminal or the
underlying terminal device represented by
-.Fa fd
+.Fa fildes
is not the controlling terminal.
.El
+.Sh LEGACY SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <unistd.h>
+.Pp
+The include file
+.In sys/types.h
+is necessary.
.Sh SEE ALSO
.Xr setpgid 2 ,
.Xr setsid 2 ,
-.Xr tcsetpgrp 3
+.Xr tcsetpgrp 3 ,
+.Xr compat 5
.Sh STANDARDS
The
.Fn tcgetpgrp