Hello,
This is something that I'd like to commit in a few days, bearing
suggestions.
There were two types of errors, mostly compiler warnings:
1. _FILE_OFFSET_BITS being redefined in pyconfig.h;
This is a problem we're familiar with, having seen similar
issues on GNU/Linux systems. I used a similar solution.
2. GCC 4.5 complains that calls to PyEval_InitThreads and
PyEval_ReleaseLock have no effect. This is because our Python
is built without thread support, leading us to use the dummy
#define in python-internal.h which just gets replaced by `0'.
Since this function returns void (checked versions 2.4 and 2.7),
I simply removed the 0.
gdb/ChangeLog:
python/python-internal.h (_FILE_OFFSET_BITS): Undefine.
(PyEval_InitThreads): Remove duplicate. Define as nothing.
(PyEval_ReleaseLock): Define as nothing.
Tested on x86_64-linux.
---
gdb/python/python-internal.h | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index c5d1e73..97ac2fd 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -36,6 +36,11 @@
#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE
+/* On sparc-solaris, /usr/include/sys/feature_tests.h defines
+ _FILE_OFFSET_BITS, which pyconfig.h also defines. Same work
+ arount technique as above. */