see especially this reply from syphilis, which describes a fix to the Tk C code in pTk/mTk/xlib/X11/X.h
Thanks for locating that eyepopslikeamosquito - I think it's fucking deplorable that we still have to keep digging up this old stuff. (And I don't even use Tk.)
The github repo (at least) should have been fixed by now, IMFO.
Unfortunately, it's still broken.
If I clone the current Tk version from github into Tk-20240331 ($ git clone https://github.com/eserte/perl-tk Tk-20240331), I still have to apply 2 fixes to that source.
Firstly, I have to apply the patch at https://github.com/chrstphrchvz/perl-tk/commit/0cc1fd7c599fc6b7050fcd7442f10824b032c462.
Then, in that very same X.h file that I've just patched, I need to replace the one occurrence of typedef unsigned long XID with typedef unsigned long long XID (at line 46).
I made all of those changes by hand (cut'n'paste) - it's not such a big deal.
That done, in Strawberry-5.38.2 I can just cd to that Tk-20240331 source directory and run "cpan .". (Ignore the error messages that are generated at the start - they're just in response to the configure probing that's being done.)
The big deal is having to continually dig up these solutions because no-one can be bothered actually fixing the github source. (Of course, it's actually a new release of Tk that's needed.)
Update: The above patch that replaces "long" with "long long" works fine on Windows, but the revised X.h would really be better rewritten as:
$ diff -u X.h X.h_preferred
--- X.h 2024-03-31 17:24:19.640385400 +1100
+++ X.h_preferred 2024-03-31 20:33:02.097334700 +1100
@@ -40,10 +40,8 @@
/* Resources */
-#if defined(_WIN64) && defined(_MSC_VER)
+#if defined(_WIN64)
typedef __int64 XID;
-#else
-typedef unsigned long long XID;
#endif
$ diff -u X.h X.h_preferred
--- X.h 2024-03-31 17:24:19.640385400 +1100
+++ X.h_preferred 2024-04-01 10:05:59.718400900 +1100
@@ -40,10 +40,10 @@
/* Resources */
-#if defined(_WIN64) && defined(_MSC_VER)
+#if defined(_WIN64)
typedef __int64 XID;
#else
-typedef unsigned long long XID;
+typedef unsigned long XID;
#endif
typedef XID Window;
Cheers, Rob | [reply] [d/l] [select] |
| [reply] |
The page says "github workflow for FreeBSD". Is it really Strawberry?
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
| [reply] [d/l] |