summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/modules
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-10-19 01:16:17 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-10-19 01:16:17 +0000
commita8bf774b96bc1ed93f0ca8514c061ee0f15bfac6 (patch)
treed6932229a256d42c3d4dd5d6b6b9247130594e00 /lldb/scripts/Python/modules
parent187fcf1e5d16456f44ab01bda3f2ecb77eff593f (diff)
downloadbcm5719-llvm-a8bf774b96bc1ed93f0ca8514c061ee0f15bfac6.tar.gz
bcm5719-llvm-a8bf774b96bc1ed93f0ca8514c061ee0f15bfac6.zip
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
Diffstat (limited to 'lldb/scripts/Python/modules')
-rw-r--r--lldb/scripts/Python/modules/readline/readline.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/scripts/Python/modules/readline/readline.cpp b/lldb/scripts/Python/modules/readline/readline.cpp
index 38268f8a4b6..d66ccf4b6b7 100644
--- a/lldb/scripts/Python/modules/readline/readline.cpp
+++ b/lldb/scripts/Python/modules/readline/readline.cpp
@@ -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
OpenPOWER on IntegriCloud