xtacy: fix for -fno-common, from Yozo TODA

This commit is contained in:
sthen 2021-02-04 19:13:18 +00:00
parent e08696c7ad
commit e5555e594c
3 changed files with 81 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.27 2019/07/12 20:51:30 sthen Exp $
# $OpenBSD: Makefile,v 1.28 2021/02/04 19:13:18 sthen Exp $
COMMENT= X11 trippy color-cycling toy
DISTNAME= xtacy114
PKGNAME= xtacy-1.14
REVISION= 3
REVISION= 4
CATEGORIES= x11
MASTER_SITES= http://www.gweep.net/~jer/

View File

@ -0,0 +1,33 @@
$OpenBSD: patch-trippy_c,v 1.1 2021/02/04 19:13:18 sthen Exp $
the definitions of "global" vars moved to trippy.c
Index: trippy.c
--- trippy.c.orig
+++ trippy.c
@@ -65,6 +65,25 @@
#define VERSION "1.14"
+/* ** global vars definition block starts ** */
+Display *display;
+Screen *scr;
+int screen;
+int nwindows, nvisible;
+int *visible;
+Window *window;
+Colormap colmap; /* One map to bind them... */
+unsigned int *CX, *CY, *M, *HC;
+Colormap colmap;
+
+int numcolors;
+int share_colors;
+GC *color_gcs;
+long** colors; /* [NCOLORS][3]; */
+double SinTbl[32];
+char *progname;
+/* ** global vars definition block ends ** */
+
struct foo options;
int *jj;
int startup=0;

View File

@ -0,0 +1,46 @@
$OpenBSD: patch-trippy_h,v 1.1 2021/02/04 19:13:18 sthen Exp $
the definitions of "global" vars moved to trippy.c
Index: trippy.h
--- trippy.h.orig
+++ trippy.h
@@ -189,24 +189,24 @@ void exit_xload();
#define max(x,y) ((x>y)?x:y)
#define min(x,y) ((x<y)?x:y)
-Display *display;
-Screen *scr;
+extern Display *display;
+extern Screen *scr;
-int screen;
-int nwindows, nvisible;
-int *visible;
-Window *window;
-Colormap colmap; /* One map to bind them... */
-unsigned int *CX, *CY, *M, *HC;
+extern int screen;
+extern int nwindows, nvisible;
+extern int *visible;
+extern Window *window;
+extern Colormap colmap; /* One map to bind them... */
+extern unsigned int *CX, *CY, *M, *HC;
-int numcolors;
-int share_colors;
-GC *color_gcs;
-long** colors; /* [NCOLORS][3]; */
-double SinTbl[32];
+extern int numcolors;
+extern int share_colors;
+extern GC *color_gcs;
+extern long** colors; /* [NCOLORS][3]; */
+extern double SinTbl[32];
extern Cursor mycursor ;
-char *progname;
+extern char *progname;
#if defined (__cplusplus) || defined (c_plusplus)
}