From 6f873e16d6a1a8f6f59c1e5a75ec5f52ce5c89b6 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 4 Jun 2022 14:13:05 +0200 Subject: [PATCH 1/3] XINCLUDE: use /usr/X11R6/include everywhere As X11 includes live in /usr/include on linux the previous path was wrong anyway so switch to a path which should work on other systems (does not break linux). --- src/sim/makefile | 2 +- src/tclx/config/linux | 2 +- src/tk/makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sim/makefile b/src/sim/makefile index 3f29de7..afc440a 100644 --- a/src/sim/makefile +++ b/src/sim/makefile @@ -1,4 +1,4 @@ -XINCLUDE = /usr/include/X11 +XINCLUDE = /usr/X11R6/include TCLHOME = ../tcl TKHOME = ../tk TCLXHOME = ../tclx diff --git a/src/tclx/config/linux b/src/tclx/config/linux index e83296f..7188333 100644 --- a/src/tclx/config/linux +++ b/src/tclx/config/linux @@ -9,6 +9,6 @@ LIBS=-lm RANLIB_CMD=ranlib MCS_CMD=true TCL_TK_LIBS= -L/usr/X11/lib -lX11 -lm -lXpm -XINCLUDE=/usr/include/X11 +XINCLUDE=/usr/X11R6/include TCL_MAN_SEPARATOR= diff --git a/src/tk/makefile b/src/tk/makefile index 885b54a..424f95b 100644 --- a/src/tk/makefile +++ b/src/tk/makefile @@ -34,7 +34,7 @@ CFLAGS = -I. -I$(XINCLUDE) -I$(TCL_DIR) -I$(TCLX_DIR) -O3 -DTK_VERSION=\"2.3\" TCL_DIR = ../tcl TCLX_DIR = ../tclx/src -XINCLUDE = /usr/include/X11 +XINCLUDE = /usr/X11R6/include XLIB = -L/usr/X11R6/lib -lX11 -lXpm LIBS = libtk.a $(TCL_DIR)/libtcl.a -- 2.39.5 From ba43e480ccc0580b680500212057fbafdd0b59ff Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Thu, 30 Jan 2025 11:39:06 +0100 Subject: [PATCH 2/3] tclxmath: add include for time.h --- src/tclx/src/tclxmath.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tclx/src/tclxmath.c b/src/tclx/src/tclxmath.c index 9f967bf..bf5a52a 100644 --- a/src/tclx/src/tclxmath.c +++ b/src/tclx/src/tclxmath.c @@ -16,6 +16,7 @@ *----------------------------------------------------------------------------- */ +#include #include "tclxint.h" extern int rand(); -- 2.39.5 From f46cb0fc60e8c021d4d89f980d248453760a6137 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Thu, 30 Jan 2025 11:39:44 +0100 Subject: [PATCH 3/3] tk/tclx: explicitly declare types fixes build failures on newer gcc versions --- src/tclx/src/tclxgdat.y | 6 +++--- src/tk/tkbitmap.c | 2 +- src/tk/tkerror.c | 2 +- src/tk/tkpack.c | 2 +- src/tk/tkpixmap.c | 2 +- src/tk/tkwindow.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tclx/src/tclxgdat.y b/src/tclx/src/tclxgdat.y index aea9f3d..2439a2f 100644 --- a/src/tclx/src/tclxgdat.y +++ b/src/tclx/src/tclxgdat.y @@ -46,11 +46,11 @@ #if 0 static time_t timeconv(int hh, int mm, int ss, int mer); static time_t daylcorr(time_t future, time_t now); - static lookup(char *id); + static int lookup(char *id); #else static time_t timeconv(); static time_t daylcorr(); - static lookup(); + static int lookup(); #endif #define AM 1 @@ -463,7 +463,7 @@ struct table milzone[] = { {0, 0, 0}}; static -lookup(id) char *id; +int lookup(id) char *id; { #define gotit (yylval=i->value, i->type) #define getid for(j=idvar, k=id; *j++ = *k++; ) diff --git a/src/tk/tkbitmap.c b/src/tk/tkbitmap.c index cc81cd0..c7693e8 100644 --- a/src/tk/tkbitmap.c +++ b/src/tk/tkbitmap.c @@ -434,7 +434,7 @@ Tk_GetBitmapFromData(interp, tkwin, source, width, height) Tk_Uid name = NULL; /* Initialization need only to prevent * compiler warning. */ int new; - static autoNumber = 0; + static int autoNumber = 0; char string[20]; if (!initialized) { diff --git a/src/tk/tkerror.c b/src/tk/tkerror.c index a58814c..b6fdb17 100644 --- a/src/tk/tkerror.c +++ b/src/tk/tkerror.c @@ -23,7 +23,7 @@ static char rcsid[] = "$Header: /user6/ouster/wish/RCS/tkError.c,v 1.10 92/04/12 #include "tkconfig.h" #include "tkint.h" -static initialized = 0; +static int initialized = 0; /* * Forward references to procedures declared later in this file: diff --git a/src/tk/tkpack.c b/src/tk/tkpack.c index f065bd5..a998017 100644 --- a/src/tk/tkpack.c +++ b/src/tk/tkpack.c @@ -95,7 +95,7 @@ static Tcl_HashTable packerHashTable; * Have statics in this module been initialized? */ -static initialized = 0; +static int initialized = 0; /* * Forward declarations for procedures defined later in this file: diff --git a/src/tk/tkpixmap.c b/src/tk/tkpixmap.c index 753bbe1..8d23dad 100644 --- a/src/tk/tkpixmap.c +++ b/src/tk/tkpixmap.c @@ -516,7 +516,7 @@ Tk_GetPixmapFromData(interp, tkwin, source, width, height) Tk_Uid name = NULL; /* Initialization need only to prevent * compiler warning. */ int new; - static autoNumber = 0; + static int autoNumber = 0; char string[20]; if (!initialized) { diff --git a/src/tk/tkwindow.c b/src/tk/tkwindow.c index 05029aa..eb6b7fe 100644 --- a/src/tk/tkwindow.c +++ b/src/tk/tkwindow.c @@ -55,7 +55,7 @@ TkDisplay *tkDisplayList = NULL; * Have statics in this module been initialized? */ -static initialized = 0; +static int initialized = 0; /* * Context information used to map from X window id's to -- 2.39.5