Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: remove unneeded includes in ed(1)
To:
tech@openbsd.org
Date:
Mon, 05 Jan 2026 20:08:55 +0100

Download raw body.

Thread
On Mon, 05 Jan 2026 00:49:47 +0100,
Jonathan Gray <jsg@jsg.id.au> wrote:
> 
> Index: bin/ed/buf.c
> ===================================================================
> RCS file: /cvs/src/bin/ed/buf.c,v
> diff -u -p -r1.25 buf.c
> --- bin/ed/buf.c	23 Apr 2024 13:34:50 -0000	1.25
> +++ bin/ed/buf.c	4 Jan 2026 23:22:32 -0000
> @@ -30,11 +30,7 @@
>   */
>  
>  #include <sys/types.h>
> -#include <sys/stat.h>
>  
> -#include <limits.h>
> -#include <regex.h>
> -#include <signal.h>
>  #include <stdlib.h>
>  #include <stdio.h>
>  #include <string.h>
> Index: bin/ed/glbl.c
> ===================================================================
> RCS file: /cvs/src/bin/ed/glbl.c,v
> diff -u -p -r1.20 glbl.c
> --- bin/ed/glbl.c	4 Jun 2018 13:26:21 -0000	1.20
> +++ bin/ed/glbl.c	4 Jan 2026 23:23:20 -0000
> @@ -29,11 +29,7 @@
>   * SUCH DAMAGE.
>   */
>  
> -#include <sys/ioctl.h>
> -#include <sys/wait.h>
> -
>  #include <regex.h>
> -#include <signal.h>
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> Index: bin/ed/io.c
> ===================================================================
> RCS file: /cvs/src/bin/ed/io.c,v
> diff -u -p -r1.26 io.c
> --- bin/ed/io.c	16 Jul 2024 05:01:10 -0000	1.26
> +++ bin/ed/io.c	4 Jan 2026 23:24:35 -0000
> @@ -28,9 +28,6 @@
>   * SUCH DAMAGE.
>   */
>  
> -#include <regex.h>
> -#include <signal.h>
> -#include <errno.h>
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> Index: bin/ed/main.c
> ===================================================================
> RCS file: /cvs/src/bin/ed/main.c,v
> diff -u -p -r1.70 main.c
> --- bin/ed/main.c	12 Oct 2024 07:58:40 -0000	1.70
> +++ bin/ed/main.c	4 Jan 2026 23:25:07 -0000
> @@ -43,13 +43,11 @@
>  
>  #include <sys/ioctl.h>
>  #include <sys/stat.h>
> -#include <sys/wait.h>
>  
>  #include <ctype.h>
>  #include <err.h>
>  #include <errno.h>
>  #include <limits.h>
> -#include <pwd.h>
>  #include <regex.h>
>  #include <setjmp.h>
>  #include <signal.h>
> Index: bin/ed/re.c
> ===================================================================
> RCS file: /cvs/src/bin/ed/re.c,v
> diff -u -p -r1.19 re.c
> --- bin/ed/re.c	19 Jun 2018 12:36:18 -0000	1.19
> +++ bin/ed/re.c	4 Jan 2026 23:25:32 -0000
> @@ -30,7 +30,6 @@
>   */
>  
>  #include <regex.h>
> -#include <signal.h>
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> Index: bin/ed/sub.c
> ===================================================================
> RCS file: /cvs/src/bin/ed/sub.c,v
> diff -u -p -r1.18 sub.c
> --- bin/ed/sub.c	11 Oct 2016 06:54:05 -0000	1.18
> +++ bin/ed/sub.c	4 Jan 2026 23:26:09 -0000
> @@ -29,9 +29,7 @@
>   * SUCH DAMAGE.
>   */
>  
> -#include <limits.h>
>  #include <regex.h>
> -#include <signal.h>
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> Index: bin/ed/undo.c
> ===================================================================
> RCS file: /cvs/src/bin/ed/undo.c,v
> diff -u -p -r1.14 undo.c
> --- bin/ed/undo.c	22 Mar 2016 17:58:28 -0000	1.14
> +++ bin/ed/undo.c	4 Jan 2026 23:26:35 -0000
> @@ -28,8 +28,6 @@
>   * SUCH DAMAGE.
>   */
>  
> -#include <regex.h>
> -#include <signal.h>
>  #include <stdio.h>
>  #include <stdlib.h>
>  
> 

Builds, OK kirill@

-- 
wbr, Kirill