This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dim
Recipients Chen.Huang, X-Istence, barry-scott, dim, gregory.p.smith, koobs, meador.inge, ndousis, ronaldoussoren
Date 2016-04-03.15:41:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I am a FreeBSD committer, and I recently ran into this issue too, since I am working on an update of libc++ in the FreeBSD base system.  As part of this work, we attempt to recompile all ports with the proposed change (see [1]).  During such a recompile, we get many errors in ports that include pyport.h in C++ mode, similar to (see [2]):

In file included from scipy/interpolate/src/_interpolate.cpp:4:
In file included from scipy/interpolate/src/interpolate.h:3:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/ios:216:
/usr/include/c++/v1/__locale:468:15: error: C++ requires a type specifier for all declarations
    char_type toupper(char_type __c) const
/usr/local/include/python2.7/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))

I think Ronald's proposed workaround is fine, since messing with ctype macros is risky in C++ mode.  E.g. the libc++ <ctype.h> header explicitly undefines all ctype macros, and replaces them with inline functions.

Additionally, the original issue mentioned in changeset 32950 [3] was fixed in October 2007 for FreeBSD 8.x [4], and subsequently the fix was merged back to FreeBSD 6.x and 7.x [5].

I'm adding an additional diff that corrects the __FreeBSD_version number checks.  This will also be submitted to the FreeBSD ports bug tracker.

Date User Action Args
2016-04-03 15:41:48dimsetrecipients: + dim, barry-scott, gregory.p.smith, ronaldoussoren, meador.inge, X-Istence, ndousis, Chen.Huang, koobs
2016-04-03 15:41:48dimsetmessageid: <>
2016-04-03 15:41:48dimlinkissue10910 messages
2016-04-03 15:41:48dimcreate