Ticket UUID: | e699a7b606aac71d25bad749c2e913b1c28d22d3 | |||
Title: | tkMacOSXImage.c: Fix build on macOS < 10.12 | |||
Type: | Patch | Version: | 8.6.12 | |
Submitter: | chrstphrchvz | Created on: | 2021-11-09 00:48:22 | |
Subsystem: | 83. Mac OS X Build | Assigned To: | marc_culler | |
Priority: | 5 Medium | Severity: | Important | |
Status: | Closed | Last Modified: | 2021-11-09 22:21:19 | |
Resolution: | Fixed | Closed By: | marc_culler | |
Closed on: | 2021-11-09 22:21:19 | |||
Description: |
Originally reported at https://trac.macports.org/ticket/63868 Building on macOS < 10.12 fails because in macosx/tkMacOSXImage.c, the NSBitmapFormatAlphaFirst constant rather than the deprecated NSAlphaFirstBitmapFormat constant is used. The attached patch uses what I believe is the preferred approach to deal with this: predefine the deprecated constant in macosx/tkMacOSXConstants.h, then use that header and the deprecated constant in macosx/tkMacOSXImage.c. | |||
User Comments: |
marc_culler (claiming to be Marc Culler) added on 2021-11-09 22:21:19:
I tested on macos 10.11. Indeed the build fails before the crash. But it succeeds after the crash. So I will close the ticket. Sorry I didn't test the build on anything less than 10.12. That was an unfortunate oversight. marc_culler (claiming to be Marc Culler) added on 2021-11-09 20:16:46: Thank you, Christopher. Indeed that is the preferred approach, although it may be preferred only because I became so grouchy when Apple deprecated tens, or was it hundreds, of enum constants in order to interchange the order of two words in the camelCased name. To get revenge I decided to always use the deprecated name within Tk. Well, OK, that approach also has the advantage that when Apple does this stuff we only need to change one file. |
Attachments:
- patch-XGetImage-constant.diff [download] added by chrstphrchvz on 2021-11-09 00:49:39. [details]