File bvi-gcc15.patch of Package bvi

diff -upr bvi-1.4.2.orig/bm_unix.c bvi-1.4.2/bm_unix.c
--- bvi-1.4.2.orig/bm_unix.c	2025-06-10 06:55:17.839312635 +0000
+++ bvi-1.4.2/bm_unix.c	2025-06-10 07:02:22.605527282 +0000
@@ -161,7 +161,7 @@ doshell(cmd)
 {
 	int	ret;
 #ifndef DJGPP
-	char	*getenv();
+	char	*getenv(const char *);
 	char	*shell;
 	char	cline[128];
 #endif
diff -upr bvi-1.4.2.orig/bmore.h bvi-1.4.2/bmore.h
--- bvi-1.4.2.orig/bmore.h	2025-06-10 06:55:17.839312635 +0000
+++ bvi-1.4.2/bmore.h	2025-06-10 07:01:29.128425295 +0000
@@ -136,7 +136,7 @@ extern	int		no_tty, no_intty;
 
 
 
-#ifdef ANSI
+#if defined(ANSI) || __STDC_VERSION__ >= 202311L
 	void	initterm(void), set_tty(void), reset_tty(void);
 	void	cleartoeol(void), clearscreen(void), highlight(void);
 	void	normal(void), bmbeep(void), home(void), sig(int);
diff -upr bvi-1.4.2.orig/bvi.h bvi-1.4.2/bvi.h
--- bvi-1.4.2.orig/bvi.h	2025-06-10 06:55:17.839312635 +0000
+++ bvi-1.4.2/bvi.h	2025-06-10 06:58:00.499844567 +0000
@@ -214,7 +214,7 @@ extern  off_t   block_begin, block_end,
 	void	d_memmove(PTR, PTR, off_t);
 #endif
 
-#ifdef ANSI
+#if defined(ANSI) || __STDC_VERSION__ >= 202311L
 	off_t	alloc_buf(off_t, char **), yd_addr(void);
 	off_t	range(int);
 	void	do_dot(void), do_exit(void), do_shell(void), do_undo(void);
diff -upr bvi-1.4.2.orig/re.c bvi-1.4.2/re.c
--- bvi-1.4.2.orig/re.c	2025-06-10 06:55:17.841312678 +0000
+++ bvi-1.4.2/re.c	2025-06-10 06:58:53.399507176 +0000
@@ -36,7 +36,7 @@
 #include	"bvi.h"
 #include	"set.h"
 
-static	int sbracket();
+static	int sbracket(int, char*, int);
 
 char	act_pat[MAXCMD];  /* found pattern */
 char	pattern[MAXCMD + 1];

openSUSE Build Service is sponsored by