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 X-Istence
Recipients X-Istence, ronaldoussoren
Date 2011-01-14.21:21:37
SpamBayes Score 8.03256e-11
Marked as misclassified No
Message-id <>
I was recently attempting to get Botan ( working with Python 2.6.6 on FreeBSD when it failed to compile, I filled a bug with Botan ( and first thought it was a compiler issue, and then thought it might be a Boost.Python issue.

However after further digging, see comment 3 ( I figured out it had to do with the fix that went in to pyport.h for issues with isspace/toupper/et al. on FreeBSD's libc and also Mac OS X.

As can be seen in a change was added to override the original definitions with a new one that used the wide character support. It was modified again in to also include Mac OS X for

The issue here is that if this file is included in any C++ code that then also includes <locale> or any of other functions that might pull in localefwd.h the defines will cause actual C++ code functions to be overwritten with invalid data, and the C++ compiler will throw errors such as:

/usr/include/c++/4.2/bits/localefwd.h:58:34: error: macro "isspace" passed 2
arguments, but takes just 1

Putting an #if 0, #endif around that block of code allows Botan's python module to cleanly compile without issues.

I do apologise that I don't have a simple C++ program that reproduces the problem.
Date User Action Args
2011-01-14 21:21:40X-Istencesetrecipients: + X-Istence, ronaldoussoren
2011-01-14 21:21:40X-Istencesetmessageid: <>
2011-01-14 21:21:37X-Istencelinkissue10910 messages
2011-01-14 21:21:37X-Istencecreate