pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

Mark Brethen mark.brethen at
Tue Jul 8 21:33:37 PDT 2014

During build of freecad I'm seeing errors of this type:

:info:build /Applications/ error: C++ requires a type specifier for all declarations
:info:build     char_type toupper(char_type __c) const
:info:build               ^~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Headers/pyport.h:731:29: note: expanded from macro 'toupper'

I was directed to the python bug report tracker at

There is a patch available, which I don't believe has been implemented. I'll submit a ticket.


More information about the macports-dev mailing list