diff mbox series

[v5,22/35] getpriority.2: Remove unused include

Message ID 20210404115847.78166-23-alx.manpages@gmail.com
State New
Headers show
Series None | expand

Commit Message

Alejandro Colomar April 4, 2021, 11:58 a.m. UTC
<sys/time.h> is not needed to get the function declaration nor any
constant used by the function.  It was only needed (before
POSIX.1) to get 'struct timeval', but that information would be
more suited for system_data_types(7), and not for this page.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/getpriority.2 | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Michael Kerrisk \(man-pages\) April 5, 2021, 10:49 a.m. UTC | #1
Hi Alex,

On 4/4/21 1:58 PM, Alejandro Colomar wrote:
> <sys/time.h> is not needed to get the function declaration nor any
> constant used by the function.  It was only needed (before
> POSIX.1) to get 'struct timeval', but that information would be
> more suited for system_data_types(7), and not for this page.
> 
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

Patch applied.

Thanks,

Michael


> ---
>  man2/getpriority.2 | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/man2/getpriority.2 b/man2/getpriority.2
> index e3d518028..d6744989d 100644
> --- a/man2/getpriority.2
> +++ b/man2/getpriority.2
> @@ -47,7 +47,6 @@
>  getpriority, setpriority \- get/set program scheduling priority
>  .SH SYNOPSIS
>  .nf
> -.B #include <sys/time.h>
>  .B #include <sys/resource.h>
>  .PP
>  .BI "int getpriority(int " which ", id_t " who );
> @@ -209,18 +208,6 @@ the real or effective user ID of the process \fIwho\fP.
>  All BSD-like systems (SunOS 4.1.3, Ultrix 4.2,
>  4.3BSD, FreeBSD 4.3, OpenBSD-2.5, ...) behave in the same
>  manner as Linux 2.6.12 and later.
> -.PP
> -Including
> -.I <sys/time.h>
> -is not required these days, but increases portability.
> -(Indeed,
> -.I <sys/resource.h>
> -defines the
> -.I rusage
> -structure with fields of type
> -.I struct timeval
> -defined in
> -.IR <sys/time.h> .)
>  .\"
>  .SS C library/kernel differences
>  Within the kernel, nice values are actually represented
>
diff mbox series

Patch

diff --git a/man2/getpriority.2 b/man2/getpriority.2
index e3d518028..d6744989d 100644
--- a/man2/getpriority.2
+++ b/man2/getpriority.2
@@ -47,7 +47,6 @@ 
 getpriority, setpriority \- get/set program scheduling priority
 .SH SYNOPSIS
 .nf
-.B #include <sys/time.h>
 .B #include <sys/resource.h>
 .PP
 .BI "int getpriority(int " which ", id_t " who );
@@ -209,18 +208,6 @@  the real or effective user ID of the process \fIwho\fP.
 All BSD-like systems (SunOS 4.1.3, Ultrix 4.2,
 4.3BSD, FreeBSD 4.3, OpenBSD-2.5, ...) behave in the same
 manner as Linux 2.6.12 and later.
-.PP
-Including
-.I <sys/time.h>
-is not required these days, but increases portability.
-(Indeed,
-.I <sys/resource.h>
-defines the
-.I rusage
-structure with fields of type
-.I struct timeval
-defined in
-.IR <sys/time.h> .)
 .\"
 .SS C library/kernel differences
 Within the kernel, nice values are actually represented