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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.