Author: Hilmar Preuße <hille42@debian.org>
        Andreas Tille <tille@debian.org>
Last-Update: 2025-10-22
Bug-Debian: https://bugs.debian.org/1074976
Description: Fix ftbfs with GCC-14/15

--- a/Web/configure
+++ b/Web/configure
@@ -614,7 +614,7 @@ cross_compiling=$ac_cv_prog_cc_cross
 cat > conftest.$ac_ext <<EOF
 #line 616 "configure"
 #include "confdefs.h"
-main(){return(0);}
+int main(){return(0);}
 EOF
 if { (eval echo configure:620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
--- a/Web/ftangle.c
+++ b/Web/ftangle.c
@@ -1402,7 +1402,7 @@ static outer_char last_out= '\0';
 
 static boolean is_label= NO;
 static boolean should_continue= NO;
-static continuation_line= NOT_CONTINUATION;
+static int continuation_line= NOT_CONTINUATION;
 
 static STMT_LBL stmt_num[50];
 
@@ -3341,7 +3341,7 @@ char*buffer;
 IN_COMMON outer_char wbprefix[MAX_FILE_NAME_LENGTH];
 
 #if(HAVE_TEMPNAM)
-extern char*tempnam();
+/* extern char*tempnam(); */
 
 if(!*wbprefix)
 STRCPY(wbprefix,"./");
--- a/Web/ftangle.web
+++ b/Web/ftangle.web
@@ -460,7 +460,7 @@ static outer_char last_out = '\0'; // In
 /* Various flags help \Fortran\ out. */
 static boolean is_label = NO;
 static boolean should_continue = NO;
-static continuation_line = NOT_CONTINUATION;
+static int continuation_line = NOT_CONTINUATION;
 
 static STMT_LBL stmt_num[50]; /* Archaic; for numbering
 			|do|s in \Fortran. Should use \Ratfor\ instead. */
@@ -3172,7 +3172,7 @@ char *buffer;
 IN_COMMON outer_char wbprefix[MAX_FILE_NAME_LENGTH];
 
 #if(HAVE_TEMPNAM)
-	extern char *tempnam();
+/*	extern char *tempnam();*/
 
 	if(!*wbprefix) 
 		STRCPY(wbprefix,"./");
--- a/Web/common.c
+++ b/Web/common.c
@@ -5729,7 +5729,7 @@ printf("]?  "),fflush(stdout);
 WHILE()
 {
 SET_COLOR(ordinary);
-gets((char*)buf);
+fgets((char *)buf, sizeof(buf), stdin);
 
 if(STRCMP(buf,"yes")==0||STRCMP(buf,"no")==0)
 break;
@@ -8351,7 +8351,7 @@ printf("\nTo enter `info FWEB' now, type
   a space-separated list of hierarchal FWEB menu items,\n\
      like `concepts structure'.\n\n\
 Type `q' to exit info.  To abort now, hit Enter:  "),fflush(stdout);
-gets((char*)buf);
+fgets((char *)buf, sizeof(buf), stdin);
 
 pmenus= buf;
 }
--- a/Web/ratfor.c
+++ b/Web/ratfor.c
@@ -2059,7 +2059,7 @@ va_arg(arg_ptr,int);
 static outer_char brkset[3]= "*?";
 
 #ifndef strpbrk
-char*strpbrk();
+#include <string.h>
 #endif
 boolean found_abbrev;
 
--- a/Web/fweave.c
+++ b/Web/fweave.c
@@ -5484,7 +5484,6 @@ outer_char*ext C1("")
 outer_char*buffer;
 
 #if(HAVE_TEMPNAM)
-extern char*tempnam();
 
 if(!*wbprefix)
 STRCPY(wbprefix,"./");
--- a/Web/idxmerge.web
+++ b/Web/idxmerge.web
@@ -28,7 +28,7 @@ return strcmp(*(char **)arg1, *(char **)
 @d CALLOC(n, type) (type *)calloc(n, sizeof(type))
 
 @a
-main(int num_args, char *args[])
+int main(int num_args, char *args[])
 {
 char **file_name, *root_name = NULL, *out_name = NULL;
 char *pg = "|pg";
