Open cessenat opened 1 month ago
Theoretically yes. However, Xlib.t seems to be generated somehow, using the script pTk/mkVFunc it seems, and I have to figure out how this is supposed to work.
Probably the change needs to be made in pTk/Xlib.h. pTk/Xlib.t will be generated from it.
I have a similar problem with gcc 14.2, I can't 'make'. Any suggestion?
The error I get is cc -c -I/usr/include/freetype2 -I.. -I/usr/include/freetype2 -I. -Ibitmaps -I/usr/include/freetype2 -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\" -fPIC "-I/home/mochan/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.0/x86_64-linux/CORE" tkCanvText.ctkCanvText.c: In function ‘GetTextIndex’: tkCanvText.c:1253:40: error: passing argument 2 of ‘TcldeclsVptr->V_Tcl_GetStringFromObj’ from incompatible pointer type [-Wincompatible-pointer-types] 1253 | string = Tcl_GetStringFromObj(obj, &length); | ^ |
---|---|---|
size_t {aka long unsigned int } |
tkCanvText.c:1253:40: note: expected ‘int ’ but argument is of type ‘size_t ’ {aka ‘long unsigned int *’}
-Wincompatible-pointer-types
For that specific issue you can try to compile with the GCC compiler option -Wincompatible-pointer-types
Didn't help :(
In file pTk/Xlib.t line 334 there is
VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned int, int)))
which, at compile time, induces with gcc 11.3 on Ubuntu 22.04while with gcc 14.1 on Fedora 40 the warning is now en error.
Therefore I would suggest to write instead
VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned char, int)))
to correct that. What do you think @eserte ? Thanks.