[MacPorts] #44288: pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation
MacPorts
noreply at macports.org
Wed Jul 9 06:09:49 PDT 2014
#44288: pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation
----------------------------+--------------------------------
Reporter: mark.brethen@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.1
Keywords: | Port:
----------------------------+--------------------------------
I have experienced build errors (example below) with pyport.h The issue is
documented in Python's bug tracker here:
http://bugs.python.org/issue10910
The problem is that pyport tries to replace the ctypes definion of the
isascii(ch) and related functions by a replacement that works better with
UTF-8 on FreeBSD and OSX. That replacement is incompatible with the
localfwd.h header.
A workaround is provided at the site, which I'm attaching.
{{{
:info:build
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:436:15:
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'
:info:build
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:442:48:
error: too many arguments provided to function-like macro invocation
:info:build const char_type* toupper(char_type* __low, const
char_type* __high) const
:info:build ^
:info:build
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Headers/pyport.h:731:9:
note: macro 'toupper' defined here
:info:build #define toupper(c) towupper(btowc(c))
:info:build ^
}}}
--
Ticket URL: <https://trac.macports.org/ticket/44288>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list