[MacPorts] #63355: quartz-wm @1.3.2: error: typedef redefinition with different types ('XID' (aka 'unsigned long') vs 'struct Picture')

MacPorts noreply at macports.org
Thu Aug 12 06:14:24 UTC 2021


#63355: quartz-wm @1.3.2: error: typedef redefinition with different types ('XID'
(aka 'unsigned long') vs 'struct Picture')
----------------------------------------+----------------------
  Reporter:  TruePath                   |      Owner:  jeremyhu
      Type:  defect                     |     Status:  assigned
  Priority:  Normal                     |  Milestone:
 Component:  ports                      |    Version:
Resolution:                             |   Keywords:  monterey
      Port:  quartz-wm, xorg-xorgproto  |
----------------------------------------+----------------------

Comment (by kencu):

 These QuickDraw globals are sometimes pulled in on various ports; they
 have unfortunately generic names, and often conflict with other software's
 choice of names, like "Picture".  I had to work around this in the
 {{{surf}}} port, for example.

 This port, {{{quartz-wm}}} already tries to solve this problem, by doing
 this in {{{quartz-wm.h}}}:
 {{{
 #define Cursor OSX_Cursor
 #define Picture OSX_Picture
 #import  <Foundation/Foundation.h>
 #undef Picture
 #undef Cursor
 }}}

 This is the standard trick -- you define the conflicting variable to
 something else, include the problematic files, and then undefine it after.

 That has worked in every system from 10.4 up to BigSur, and in other
 ports.

 The question is why is that not working now, in Monterey?

-- 
Ticket URL: <https://trac.macports.org/ticket/63355#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list