This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Likely incorrect patch: remove the faulty basename() prototype from libiberty


Libiberty provides basename() for those platforms that do not have one.

On platforms that *do* have one, you need to tell libiberty that you
already have one.  In your case, including some other header that
prototypes it, and *telling* libiberty that you have done so, is the
right solution.

Including a header that prototypes it, and *not* telling libiberty that
you have done so, leads to the error.

So each project must decide if it has a basename, and if not, it relies
on libiberty to provide one.  If you decide you have a basename and
*also* ask libiberty to provide one, you end up with a conflict.

Most of this difficulty comes from the fact that autoconf is run by gdb,
not libiberty, to control the macros that libiberty's includes see when
included by gdb.  There is no way for libiberty's autoconf to tell gdb
what to do.  So, we can't have a solution that's 100% controlled by
libiberty alone.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]