This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: Another HP-UX IA64 Build patch


> > I see it doesn't have the const modifier that libiberty has.  I didn't
> > get a warning or error presumbably because the build didn't include
> > libgen.h.
> 
> This is a libiberty bug.

It's not supposed to be.  Applications using libiberty.h need to
define HAVE_DECL_BASENAME properly.  If a prototype is found in the
system headers, libiberty.h should not provide a prototype *at all*.

If the application checks and does not find any prototype, libiberty.h
should provide a full prototype.

If the application does not check, libiberty.h will provide a
K&R-style empty prototype.

All the os-specific exceptions are there because a lot of application
developers are too lazy to add the checks in all over the place
(understandable) so they special cased their OS instead.  Adding to
the list is, in general, the wrong thing to do.  If anything, the list
should be shrinking as applications learn to properly test for the
prototype.


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