Skip to content

Commit

Permalink
misc/deco: fix build with -fno-common (clang 11 and gcc 10)
Browse files Browse the repository at this point in the history
PORTREVISION not bumped as it fixes build for FreeBSD 13.

Reported by:	pkg-fallout
  • Loading branch information
eugen authored and eugen committed Aug 20, 2020
1 parent 10883ec commit 4b6803f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
8 changes: 8 additions & 0 deletions misc/deco/files/patch-env.h
@@ -0,0 +1,8 @@
--- env.h.orig 1997-07-12 16:29:23 UTC
+++ env.h
@@ -1,4 +1,4 @@
-char **EnvVector;
+static char **EnvVector;
void EnvInit (char **env);
char *EnvGet (char *name);
void EnvPut (char *name, char *value);
20 changes: 15 additions & 5 deletions misc/deco/files/patch-scr.c
@@ -1,5 +1,15 @@
Index: scr.c
@@ -167,7 +167,7 @@
--- scr.c.orig 1998-12-29 16:57:11 UTC
+++ scr.c
@@ -148,7 +148,7 @@ WINDOW VScreen;
int BlackWhite = 0;
int ColorMode = 1;
int GraphMode = 1;
-int TtyUpperCase = 0;
+extern int TtyUpperCase;

static WINDOW curscr;
static scrool, rscrool;
@@ -167,7 +167,7 @@ static char *KS, *KE;

static char *CL, *CM, *SE, *SO, *TE, *TI, *VE, *VS,
*AL, *DL, *IS, *IF, *FS, *MD, *MH, *ME, *MR,
Expand All @@ -8,15 +18,15 @@ Index: scr.c
static NF, NB;
static char MS, C2;

@@ -231,6 +231,7 @@
@@ -231,6 +231,7 @@ struct CapTab outtab [] = {
{ "Cs", CAPSTR, 0, 0, 0, &Cs, },
{ "Ce", CAPSTR, 0, 0, 0, &Ce, },
{ "Ct", CAPSTR, 0, 0, 0, &Ct, },
+ { "op", CAPSTR, 0, 0, 0, &OP, },
{ { 0, 0, }, 0, 0, 0, 0, 0, },
};

@@ -413,6 +414,8 @@
@@ -413,6 +414,8 @@ void VClose ()
tputs (TE);
if (KE)
tputs (KE);
Expand All @@ -25,7 +35,7 @@ Index: scr.c
VFlush ();
TtyReset ();
}
@@ -425,6 +428,8 @@
@@ -425,6 +428,8 @@ void VRestore ()
tputs (VE);
if (KE)
tputs (KE);
Expand Down
11 changes: 11 additions & 0 deletions misc/deco/files/patch-tty.c
@@ -0,0 +1,11 @@
--- tty.c.orig 1997-07-18 14:58:32 UTC
+++ tty.c
@@ -82,7 +82,7 @@ static struct ltchars oldchars, newchars;
# define OXTABS TAB3
#endif

-int TtyUpperCase;
+int TtyUpperCase = 0;

#define NOCHAR 0

0 comments on commit 4b6803f

Please sign in to comment.