Re: GDB Python extension on AIX

Joel Brobecker <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
> Would the appended patch be an acceptable approach?

Sorry for the late reply (holidays and traveling). That would
seem reasonable to me, but patches in the python/ subdir have
traditionally been Tom and Doug's territory.

My suggestion is to modify your comment about AIX to include
the issue you've been describing in this email chain, to make it
easier to remember why the workaround should not be applied on
AIX, and then resubmit on gdb-patches, with Doug Evans in Cc:.

> gdb/
> * python/python-internal.h: Don't redefine _POSIX_C_SOURCE and
> _XOPEN_SOURCE on AIX.
> 
> diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
> index 8545c7b..6378ccc 100644
> --- a/gdb/python/python-internal.h
> +++ b/gdb/python/python-internal.h
> @@ -72,8 +72,12 @@
>     To work around this, undef _POSIX_C_SOURCE before we include Python.h.
> 
>     Same problem with _XOPEN_SOURCE.  */
> +
> +/* A kludge to avoid overriding on AIX.  */
> +#ifndef _AIX
>  #undef _POSIX_C_SOURCE
>  #undef _XOPEN_SOURCE
> +#endif
> 
>  /* On sparc-solaris, /usr/include/sys/feature_tests.h defines
>     _FILE_OFFSET_BITS, which pyconfig.h also defines.  Same work

-- 
Joel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.