GDB Python extension on AIX

Joel Brobecker brobecker@adacore.com
Wed Aug 31 23:41:00 GMT 2016


> 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



More information about the Gdb mailing list