1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-31 10:46:16 +00:00

- Fix build with gcc41

PR:		ports/104104
Submitted by:	trasz <trasz@pin.if.uz.zgora.pl>
This commit is contained in:
Martin Wilke 2006-10-07 14:52:56 +00:00
parent a175137812
commit f223c764a7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=174785
10 changed files with 73 additions and 15 deletions

View File

@ -1,5 +1,12 @@
--- config.c.orig Sun May 4 06:48:04 2003
+++ config.c Sat Feb 19 11:30:53 2005
@@ -1,5 +1,6 @@
#include <sys/types.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sys/stat.h>
#include <signal.h>
@@ -238,8 +238,8 @@
fprintf(makefile, "\nclean: \n\trm -f *.o core \n");
fprintf(makefile, "\ndistclean: clean\n\trm -f splitvt Makefile\n");

View File

@ -0,0 +1,10 @@
--- cut-paste.c.orig Sat Oct 7 14:38:24 2006
+++ cut-paste.c Sat Oct 7 14:38:37 2006
@@ -2,6 +2,7 @@
/* The cut-paste module for splitvt */
#include <stdio.h>
+#include <string.h>
#include "vt100.h"
#include "video.h"

View File

@ -1,10 +1,11 @@
--- misc.c.orig Sat Jan 13 13:48:13 2001
+++ misc.c Wed Jun 18 04:44:02 2003
@@ -5,6 +5,7 @@
--- misc.c.orig Wed Dec 15 10:28:45 2004
+++ misc.c Sat Oct 7 14:34:28 2006
@@ -5,6 +5,8 @@
#include <fcntl.h>
#include <stdio.h>
#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef HAVE_TERMIO_H

View File

@ -1,10 +1,11 @@
--- splitvt.c.orig Sat Jan 13 14:00:22 2001
+++ splitvt.c Wed Jun 18 04:44:39 2003
@@ -21,6 +21,7 @@
--- splitvt.c.orig Sat Jan 13 23:00:22 2001
+++ splitvt.c Sat Oct 7 14:33:17 2006
@@ -21,6 +21,8 @@
#include <stdio.h>
#include <errno.h>
#include <pwd.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

View File

@ -0,0 +1,10 @@
--- terminal.c.orig Sat Oct 7 14:37:05 2006
+++ terminal.c Sat Oct 7 14:37:17 2006
@@ -6,6 +6,7 @@
#include <stdio.h>
+#include <string.h>
#include "video.h"
#include "terminal.h"

View File

@ -1,10 +1,11 @@
--- utmp.c.orig Sat Jan 13 13:48:13 2001
+++ utmp.c Wed Jun 18 04:45:38 2003
@@ -6,13 +6,14 @@
--- utmp.c.orig Sat Jan 13 22:48:13 2001
+++ utmp.c Sat Oct 7 14:35:08 2006
@@ -6,13 +6,15 @@
#include <fcntl.h>
#include <utmp.h>
#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
#ifdef DEBUG_UTMP
#undef UTMP_FILE

View File

@ -1,10 +1,11 @@
--- vt100.c.orig Sat Jun 3 14:31:05 2000
+++ vt100.c Wed Jun 18 04:44:21 2003
@@ -17,6 +17,7 @@
--- vt100.c.orig Sat Jun 3 23:31:05 2000
+++ vt100.c Sat Oct 7 14:35:57 2006
@@ -17,6 +17,8 @@
#include <errno.h>
#include <stdio.h>
#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
#include "vt100.h"
#include "video.h"
#include "terminal.h"

View File

@ -1,10 +1,11 @@
--- vtmouse.c.orig Sat Jun 3 14:05:57 2000
+++ vtmouse.c Wed Jun 18 04:46:02 2003
@@ -8,6 +8,7 @@
--- vtmouse.c.orig Sat Jun 3 23:05:57 2000
+++ vtmouse.c Sat Oct 7 14:37:42 2006
@@ -8,6 +8,8 @@
#define SPLITVT_SOURCE
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include "vtmouse.h"
extern FILE *safe_popen(); /* From misc.c */

View File

@ -0,0 +1,9 @@
--- vtmouse.h.orig Sat Oct 7 02:22:11 2006
+++ vtmouse.h Sat Oct 7 02:22:36 2006
@@ -39,5 +39,5 @@
extern int event_getc();
extern void event_quit();
-extern FILE *xt_input, *xt_output; /* Usually untouched */
+static FILE *xt_input, *xt_output; /* Usually untouched */

View File

@ -0,0 +1,17 @@
--- vttest.c.orig Sat Oct 7 15:38:17 2006
+++ vttest.c Sat Oct 7 15:40:43 2006
@@ -87,9 +87,13 @@
setjmp(alarm_buf);
#endif
while ( !alarmed && (x < 20) ) {
- if ( read(fd, &buff[x++], 1) <= 0 )
+ // Workaround for gcc41. Without it, splitvt fails with
+ // "Can't initialize screen: Terminal type must be set to vt100".
+ if ( read(fd, &buff[x], 1) <= 0 )
break;
+ x++;
}
+ x++;
buff[x]='\0'; /* For printing, if we desire. */
if ( buff[0] == '\033' ) /* An escape sequence? :) */
rc=1;