Author: compnerd Date: Sun Oct 18 20:16:17 2015 New Revision: 250673 URL: http://llvm.org/viewvc/llvm-project?rev=250673&view=rev Log: Python: follow python guidelines for header usage
Python requires that Python.h is included before any std header. Not doing so results in conflicts with standards macros such as `_XOPEN_SOURCE`. NFC. Modified: lldb/trunk/scripts/Python/modules/readline/readline.cpp Modified: lldb/trunk/scripts/Python/modules/readline/readline.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modules/readline/readline.cpp?rev=250673&r1=250672&r2=250673&view=diff ============================================================================== --- lldb/trunk/scripts/Python/modules/readline/readline.cpp (original) +++ lldb/trunk/scripts/Python/modules/readline/readline.cpp Sun Oct 18 20:16:17 2015 @@ -1,6 +1,10 @@ -#include <stdio.h> +// NOTE: Since Python may define some pre-processor definitions which affect the +// standard headers on some systems, you must include Python.h before any +// standard headers are included. #include "Python.h" +#include <stdio.h> + #ifndef LLDB_DISABLE_LIBEDIT #include <editline/readline.h> #endif _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits