[Lldb-commits] [lldb] r208520 - python: silence macro redefinition warnings

Joerg Sonnenberger joerg at britannica.bec.de
Mon May 12 09:29:15 PDT 2014

On Mon, May 12, 2014 at 06:44:01AM -0000, Saleem Abdulrasool wrote:
> Author: compnerd
> Date: Mon May 12 01:44:01 2014
> New Revision: 208520
> URL: http://llvm.org/viewvc/llvm-project?rev=208520&view=rev
> Log:
> python: silence macro redefinition warnings
> Python defines _XOPEN_SOURCE and _POSIX_C_SOURCE unconditionally.  On Linux,
> this is problematic as glibc's features.h defines these values if _GNU_SOURCE is
> defined to the value that is currently implemented.  Python defines it to the
> versions that it requires, which may be different.  Undefine the macros on Linux
> (technically, this should be safe to do globally) before including the python
> headers.

It is not. Unlike Linux, the BSDs generally require you to define
_XOPEN_SOURCE etc *before* including the first header and *not* to mess
with them afterwards. The default is "provide everything".


More information about the lldb-commits mailing list