From a8bf774b96bc1ed93f0ca8514c061ee0f15bfac6 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 19 Oct 2015 01:16:17 +0000 Subject: [PATCH] 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. llvm-svn: 250673 --- lldb/scripts/Python/modules/readline/readline.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lldb/scripts/Python/modules/readline/readline.cpp b/lldb/scripts/Python/modules/readline/readline.cpp index 38268f8a4b6d..d66ccf4b6b7d 100644 --- a/lldb/scripts/Python/modules/readline/readline.cpp +++ b/lldb/scripts/Python/modules/readline/readline.cpp @@ -1,6 +1,10 @@ -#include +// 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 + #ifndef LLDB_DISABLE_LIBEDIT #include #endif