svn commit: r549615 - in head/misc/window: . files
Stefan Eßer
se at FreeBSD.org
Tue Sep 22 17:40:53 UTC 2020
Author: se
Date: Tue Sep 22 17:40:50 2020
New Revision: 549615
URL: https://svnweb.freebsd.org/changeset/ports/549615
Log:
Fix build with -fno-common
Added:
head/misc/window/files/
head/misc/window/files/patch-alias.h (contents, props changed)
head/misc/window/files/patch-context.c (contents, props changed)
head/misc/window/files/patch-context.h (contents, props changed)
head/misc/window/files/patch-defs.h (contents, props changed)
head/misc/window/files/patch-main.c (contents, props changed)
head/misc/window/files/patch-mystring.h (contents, props changed)
head/misc/window/files/patch-string.c (contents, props changed)
head/misc/window/files/patch-tt.h (contents, props changed)
head/misc/window/files/patch-ttgeneric.c (contents, props changed)
head/misc/window/files/patch-var.h (contents, props changed)
head/misc/window/files/patch-ww.h (contents, props changed)
head/misc/window/files/patch-wwinit.c (contents, props changed)
head/misc/window/files/patch-xx.c (contents, props changed)
head/misc/window/files/patch-xx.h (contents, props changed)
Modified:
head/misc/window/Makefile
Modified: head/misc/window/Makefile
==============================================================================
--- head/misc/window/Makefile Tue Sep 22 17:32:08 2020 (r549614)
+++ head/misc/window/Makefile Tue Sep 22 17:40:50 2020 (r549615)
@@ -3,6 +3,7 @@
PORTNAME= window
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= misc
MASTER_SITES= http://people.FreeBSD.org/~trhodes/
Added: head/misc/window/files/patch-alias.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-alias.h Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,8 @@
+--- alias.h.orig 2008-07-12 06:05:22 UTC
++++ alias.h
+@@ -50,4 +50,4 @@
+ #define alias_unset(n) var_unset1(&alias_head, n)
+ #define alias_lookup(n) (*var_lookup1(&alias_head, n))
+
+-struct var *alias_head;
++extern struct var *alias_head;
Added: head/misc/window/files/patch-context.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-context.c Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,11 @@
+--- context.c.orig 2009-02-23 10:26:32 UTC
++++ context.c
+@@ -46,6 +46,8 @@ static char rcsid[] =
+ #include <fcntl.h>
+ #include <stdlib.h>
+
++struct context cx;
++
+ /*
+ * Context push/pop for nested command files.
+ */
Added: head/misc/window/files/patch-context.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-context.h Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,8 @@
+--- context.h.orig 2008-07-12 06:05:22 UTC
++++ context.h
+@@ -81,4 +81,4 @@ struct context {
+ #define X_FILE 1 /* input is a file */
+ #define X_BUF 2 /* input is a buffer */
+
+-struct context cx; /* the current context */
++extern struct context cx; /* the current context */
Added: head/misc/window/files/patch-defs.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-defs.h Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,49 @@
+--- defs.h.orig 2008-07-12 06:05:22 UTC
++++ defs.h
+@@ -42,29 +42,29 @@
+
+ #define NWINDOW 9
+
+-struct timeval starttime;
++extern struct timeval starttime;
+
+-struct ww *window[NWINDOW]; /* the windows */
+-struct ww *selwin; /* the selected window */
+-struct ww *lastselwin; /* the last selected window */
+-struct ww *cmdwin; /* the command window */
+-struct ww *framewin; /* the window for framing */
+-struct ww *boxwin; /* the window for the box */
+-struct ww *fgwin; /* the last foreground window */
++extern struct ww *window[NWINDOW]; /* the windows */
++extern struct ww *selwin; /* the selected window */
++extern struct ww *lastselwin; /* the last selected window */
++extern struct ww *cmdwin; /* the command window */
++extern struct ww *framewin; /* the window for framing */
++extern struct ww *boxwin; /* the window for the box */
++extern struct ww *fgwin; /* the last foreground window */
+
+ #define isfg(w) ((w)->ww_order <= fgwin->ww_order)
+
+-char *default_shell[128]; /* default shell argv */
+-char *default_shellfile; /* default shell program */
+-int default_nline; /* default buffer size for new windows */
+-int default_smooth; /* default "smooth" parameter */
+-char escapec; /* the escape character */
++extern char *default_shell[128]; /* default shell argv */
++extern char *default_shellfile; /* default shell program */
++extern int default_nline; /* default buffer size for new windows */
++extern int default_smooth; /* default "smooth" parameter */
++extern char escapec; /* the escape character */
+
+ /* flags */
+-char quit; /* quit command issued */
+-char terse; /* terse mode */
+-char debug; /* debug mode */
+-char incmd; /* in command mode */
++extern char quit; /* quit command issued */
++extern char terse; /* terse mode */
++extern char debug; /* debug mode */
++extern char incmd; /* in command mode */
+
+ struct ww *getwin();
+ struct ww *openwin();
Added: head/misc/window/files/patch-main.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-main.c Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,33 @@
+--- main.c.orig 2008-07-12 06:05:22 UTC
++++ main.c
+@@ -57,6 +57,30 @@ static char rcsid[] =
+
+ #define next(a) (*++*(a) ? *(a) : (*++(a) ? *(a) : (char *)(uintptr_t)usage()))
+
++struct ww *window[NWINDOW]; /* the windows */
++struct ww *selwin; /* the selected window */
++struct ww *lastselwin; /* the last selected window */
++struct ww *cmdwin; /* the command window */
++struct ww *framewin; /* the window for framing */
++struct ww *boxwin; /* the window for the box */
++struct ww *fgwin; /* the last foreground window */
++
++struct var *alias_head;
++struct var *var_head;
++
++char *default_shell[128]; /* default shell argv */
++char *default_shellfile; /* default shell program */
++int default_nline; /* default buffer size for new windows */
++int default_smooth; /* default "smooth" parameter */
++char escapec; /* the escape character */
++
++struct timeval starttime;
++
++char quit; /* quit command issued */
++char terse; /* terse mode */
++char debug; /* debug mode */
++char incmd; /* in command mode */
++
+ /*ARGSUSED*/
+ main(argc, argv)
+ char **argv;
Added: head/misc/window/files/patch-mystring.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-mystring.h Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,11 @@
+--- mystring.h.orig 2008-07-12 06:05:22 UTC
++++ mystring.h
+@@ -53,7 +53,7 @@ struct mystring {
+ char s_data[1];
+ };
+
+-struct mystring str_head;
++extern struct mystring str_head;
+
+ #define str_offset ((unsigned)str_head.s_data - (unsigned)&str_head)
+ #define str_stos(s) ((struct mystring *)((unsigned)(s) - str_offset))
Added: head/misc/window/files/patch-string.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-string.c Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,11 @@
+--- string.c.orig 2009-02-23 10:26:32 UTC
++++ string.c
+@@ -45,6 +45,8 @@ static char rcsid[] =
+ #include <stdio.h>
+ #include <stdlib.h>
+
++struct mystring str_head;
++
+ char *
+ str_cpy(s)
+ register char *s;
Added: head/misc/window/files/patch-tt.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-tt.h Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,35 @@
+--- tt.h.orig 2008-07-12 06:05:22 UTC
++++ tt.h
+@@ -98,7 +98,7 @@ struct tt {
+ /* ttflush() hook */
+ int (*tt_flush)();
+ };
+-struct tt tt;
++extern struct tt tt;
+
+ /*
+ * tt_padc is used by the compression routine.
+@@ -120,8 +120,8 @@ extern struct tt_tab tt_tab[];
+ * Clean interface to termcap routines.
+ * Too may t's.
+ */
+-char tt_strings[1024]; /* string buffer */
+-char *tt_strp; /* pointer for it */
++extern char tt_strings[1024]; /* string buffer */
++extern char *tt_strp; /* pointer for it */
+
+ struct tt_str {
+ char *ts_str;
+@@ -140,9 +140,9 @@ int tttputc();
+ * These variables have different meanings from the ww_ob* variables.
+ * But I'm too lazy to think up different names.
+ */
+-char *tt_ob;
+-char *tt_obp;
+-char *tt_obe;
++extern char *tt_ob;
++extern char *tt_obp;
++extern char *tt_obe;
+ #define ttputc(c) (tt_obp < tt_obe ? (*tt_obp++ = (c)) \
+ : (ttflush(), *tt_obp++ = (c)))
+
Added: head/misc/window/files/patch-ttgeneric.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-ttgeneric.c Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,16 @@
+--- ttgeneric.c.orig 2008-07-12 06:05:22 UTC
++++ ttgeneric.c
+@@ -43,6 +43,13 @@ static char rcsid[] =
+ #include "ww.h"
+ #include "tt.h"
+
++struct tt tt;
++char tt_strings[1024];
++char *tt_strp;
++char *tt_ob;
++char *tt_obp;
++char *tt_obe;
++
+ char PC, *BC, *UP;
+
+ /* normal frame */
Added: head/misc/window/files/patch-var.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-var.h Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,8 @@
+--- var.h.orig 2008-07-12 06:05:22 UTC
++++ var.h
+@@ -56,4 +56,4 @@ struct var **var_lookup1();
+ #define var_lookup(n) (*var_lookup1(&var_head, n))
+ #define var_walk(f, a) var_walk1(var_head, f, a)
+
+-struct var *var_head; /* secret, shhh */
++extern struct var *var_head; /* secret, shhh */
Added: head/misc/window/files/patch-ww.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-ww.h Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,130 @@
+--- ww.h.orig 2008-07-12 06:05:22 UTC
++++ ww.h
+@@ -207,44 +207,44 @@ struct ww_update {
+ #define WWU_TOUCHED 0x01 /* touched */
+
+ /* the window structures */
+-struct ww wwhead;
+-struct ww *wwindex[NWW + 1]; /* last location is for wwnobody */
+-struct ww wwnobody;
++extern struct ww wwhead;
++extern struct ww *wwindex[NWW + 1]; /* last location is for wwnobody */
++extern struct ww wwnobody;
+
+ /* tty things */
+-struct ww_tty wwoldtty; /* the old (saved) terminal settings */
+-struct ww_tty wwnewtty; /* the new (current) terminal settings */
+-struct ww_tty wwwintty; /* the terminal settings for windows */
+-char *wwterm; /* the terminal name */
+-char wwtermcap[1024]; /* place for the termcap */
++extern struct ww_tty wwoldtty; /* the old (saved) terminal settings */
++extern struct ww_tty wwnewtty; /* the new (current) terminal settings */
++extern struct ww_tty wwwintty; /* the terminal settings for windows */
++extern char *wwterm; /* the terminal name */
++extern char wwtermcap[1024]; /* place for the termcap */
+
+ /* generally useful variables */
+-int wwnrow, wwncol; /* the screen size */
+-char wwavailmodes; /* actually supported modes */
+-char wwcursormodes; /* the modes for the fake cursor */
+-char wwwrap; /* terminal has auto wrap around */
+-int wwdtablesize; /* result of getdtablesize() call */
+-char **wwsmap; /* the screen map */
+-union ww_char **wwos; /* the old (current) screen */
+-union ww_char **wwns; /* the new (desired) screen */
+-union ww_char **wwcs; /* the checkpointed screen */
+-char *wwtouched; /* wwns changed flags */
+-struct ww_update *wwupd; /* for display update */
+-int wwospeed; /* output baud rate, copied from wwoldtty */
+-int wwbaud; /* wwospeed converted into actual number */
+-int wwcursorrow, wwcursorcol; /* where we want the cursor to be */
+-int wwerrno; /* error number */
++extern int wwnrow, wwncol; /* the screen size */
++extern char wwavailmodes; /* actually supported modes */
++extern char wwcursormodes; /* the modes for the fake cursor */
++extern char wwwrap; /* terminal has auto wrap around */
++extern int wwdtablesize; /* result of getdtablesize() call */
++extern char **wwsmap; /* the screen map */
++extern union ww_char **wwos; /* the old (current) screen */
++extern union ww_char **wwns; /* the new (desired) screen */
++extern union ww_char **wwcs; /* the checkpointed screen */
++extern char *wwtouched; /* wwns changed flags */
++extern struct ww_update *wwupd; /* for display update */
++extern int wwospeed; /* output baud rate, copied from wwoldtty */
++extern int wwbaud; /* wwospeed converted into actual number */
++extern int wwcursorrow, wwcursorcol; /* where we want the cursor to be */
++extern int wwerrno; /* error number */
+
+ /* statistics */
+-int wwnflush, wwnwr, wwnwre, wwnwrz, wwnwrc;
+-int wwnwwr, wwnwwra, wwnwwrc;
+-int wwntokdef, wwntokuse, wwntokbad, wwntoksave, wwntokc;
+-int wwnupdate, wwnupdline, wwnupdmiss;
+-int wwnupdscan, wwnupdclreol, wwnupdclreos, wwnupdclreosmiss, wwnupdclreosline;
+-int wwnread, wwnreade, wwnreadz;
+-int wwnreadc, wwnreadack, wwnreadnack, wwnreadstat, wwnreadec;
+-int wwnwread, wwnwreade, wwnwreadz, wwnwreadd, wwnwreadc, wwnwreadp;
+-int wwnselect, wwnselecte, wwnselectz;
++extern int wwnflush, wwnwr, wwnwre, wwnwrz, wwnwrc;
++extern int wwnwwr, wwnwwra, wwnwwrc;
++extern int wwntokdef, wwntokuse, wwntokbad, wwntoksave, wwntokc;
++extern int wwnupdate, wwnupdline, wwnupdmiss;
++extern int wwnupdscan, wwnupdclreol, wwnupdclreos, wwnupdclreosmiss, wwnupdclreosline;
++extern int wwnread, wwnreade, wwnreadz;
++extern int wwnreadc, wwnreadack, wwnreadnack, wwnreadstat, wwnreadec;
++extern int wwnwread, wwnwreade, wwnwreadz, wwnwreadd, wwnwreadc, wwnwreadp;
++extern int wwnselect, wwnselecte, wwnselectz;
+
+ /* quicky macros */
+ #define wwsetcursor(r,c) (wwcursorrow = (r), wwcursorcol = (c))
+@@ -256,27 +256,27 @@ int wwnselect, wwnselecte, wwnselectz;
+
+ /* things for handling input */
+ void wwrint(); /* interrupt handler */
+-struct ww *wwcurwin; /* window to copy input into */
+-char *wwib; /* input (keyboard) buffer */
+-char *wwibe; /* wwib + sizeof buffer */
+-char *wwibp; /* current read position in buffer */
+-char *wwibq; /* current write position in buffer */
++extern struct ww *wwcurwin; /* window to copy input into */
++extern char *wwib; /* input (keyboard) buffer */
++extern char *wwibe; /* wwib + sizeof buffer */
++extern char *wwibp; /* current read position in buffer */
++extern char *wwibq; /* current write position in buffer */
+ #define wwmaskc(c) ((c) & 0xff)
+ #define wwgetc() (wwibp < wwibq ? wwmaskc(*wwibp++) : -1)
+ #define wwpeekc() (wwibp < wwibq ? wwmaskc(*wwibp) : -1)
+ #define wwungetc(c) (wwibp > wwib ? *--wwibp = (c) : -1)
+
+ /* things for short circuiting wwiomux() */
+-char wwintr; /* interrupting */
+-char wwsetjmp; /* want a longjmp() from wwrint() and wwchild() */
+-jmp_buf wwjmpbuf; /* jmpbuf for above */
++extern char wwintr; /* interrupting */
++extern char wwsetjmp; /* want a longjmp() from wwrint() and wwchild() */
++extern jmp_buf wwjmpbuf; /* jmpbuf for above */
+ #define wwinterrupt() wwintr
+ #define wwsetintr() do { wwintr = 1; if (wwsetjmp) longjmp(wwjmpbuf, 1); } \
+ while (0)
+ #define wwclrintr() (wwintr = 0)
+
+ /* checkpointing */
+-int wwdocheckpoint;
++extern int wwdocheckpoint;
+
+ /* the window virtual terminal */
+ #define WWT_TERM "window-v2"
+@@ -294,11 +294,11 @@ int wwdocheckpoint;
+ #define WWT_IMEI "im=\\E@:ei=\\EO:ic=:mi:" /* XXX, ic for emacs bug */
+ #define WWT_IC "ic=\\EP:"
+ #define WWT_DC "dc=\\EN:"
+-char wwwintermcap[1024]; /* terminal-specific but window-independent
++extern char wwwintermcap[1024]; /* terminal-specific but window-independent
+ part of the window termcap */
+ #ifdef TERMINFO
+ /* where to put the temporary terminfo directory */
+-char wwterminfopath[1024];
++extern char wwterminfopath[1024];
+ #endif
+
+ /* our functions */
Added: head/misc/window/files/patch-wwinit.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-wwinit.c Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,61 @@
+--- wwinit.c.orig 2009-02-23 10:26:32 UTC
++++ wwinit.c
+@@ -48,6 +48,58 @@ static char rcsid[] =
+ #include <termcap.h>
+ #include "char.h"
+
++struct ww wwhead;
++struct ww *wwindex[NWW + 1]; /* last location is for wwnobody */
++struct ww wwnobody;
++
++extern char *wwterm; /* the terminal name */
++extern char wwtermcap[1024]; /* place for the termcap */
++
++int wwnrow, wwncol; /* the screen size */
++char wwavailmodes; /* actually supported modes */
++char wwcursormodes; /* the modes for the fake cursor */
++char wwwrap; /* terminal has auto wrap around */
++int wwdtablesize; /* result of getdtablesize() call */
++char **wwsmap; /* the screen map */
++union ww_char **wwos; /* the old (current) screen */
++union ww_char **wwns; /* the new (desired) screen */
++union ww_char **wwcs; /* the checkpointed screen */
++char *wwtouched; /* wwns changed flags */
++struct ww_update *wwupd; /* for display update */
++int wwospeed; /* output baud rate, copied from wwoldtty */
++int wwbaud; /* wwospeed converted into actual number */
++int wwcursorrow, wwcursorcol; /* where we want the cursor to be */
++int wwerrno; /* error number */
++
++int wwnflush, wwnwr, wwnwre, wwnwrz, wwnwrc;
++int wwnwwr, wwnwwra, wwnwwrc;
++int wwntokdef, wwntokuse, wwntokbad, wwntoksave, wwntokc;
++int wwnupdate, wwnupdline, wwnupdmiss;
++int wwnupdscan, wwnupdclreol, wwnupdclreos, wwnupdclreosmiss, wwnupdclreosline;
++int wwnread, wwnreade, wwnreadz;
++int wwnreadc, wwnreadack, wwnreadnack, wwnreadstat, wwnreadec;
++int wwnwread, wwnwreade, wwnwreadz, wwnwreadd, wwnwreadc, wwnwreadp;
++int wwnselect, wwnselecte, wwnselectz;
++
++struct ww_tty wwoldtty; /* the old (saved) terminal settings */
++struct ww_tty wwnewtty; /* the new (current) terminal settings */
++struct ww_tty wwwintty; /* the terminal settings for windows */
++char *wwterm;
++char wwtermcap[1024];
++char wwwintermcap[1024];
++
++struct ww *wwcurwin; /* window to copy input into */
++char *wwib; /* input (keyboard) buffer */
++char *wwibe; /* wwib + sizeof buffer */
++char *wwibp; /* current read position in buffer */
++char *wwibq; /* current write position in buffer */
++
++char wwintr;
++char wwsetjmp;
++jmp_buf wwjmpbuf;
++
++int wwdocheckpoint;
++
+ wwinit()
+ {
+ register i, j;
Added: head/misc/window/files/patch-xx.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-xx.c Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,15 @@
+--- xx.c.orig 2009-02-23 10:26:32 UTC
++++ xx.c
+@@ -46,6 +46,12 @@ static char rcsid[] =
+ #include <stdlib.h>
+ #include <strings.h>
+
++struct xx *xx_head, *xx_tail;
++struct xx *xx_freelist;
++
++char *xxbuf, *xxbufp, *xxbufe;
++int xxbufsize;
++
+ xxinit()
+ {
+ if (ttinit() < 0)
Added: head/misc/window/files/patch-xx.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/window/files/patch-xx.h Tue Sep 22 17:40:50 2020 (r549615)
@@ -0,0 +1,17 @@
+--- xx.h.orig 2008-07-12 06:05:22 UTC
++++ xx.h
+@@ -50,10 +50,10 @@ struct xx {
+
+ struct xx *xxalloc();
+
+-struct xx *xx_head, *xx_tail;
+-struct xx *xx_freelist;
++extern struct xx *xx_head, *xx_tail;
++extern struct xx *xx_freelist;
+
+-char *xxbuf, *xxbufp, *xxbufe;
+-int xxbufsize;
++extern char *xxbuf, *xxbufp, *xxbufe;
++extern int xxbufsize;
+
+ #define char_sep '\0'
More information about the svn-ports-all
mailing list