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


> This is wrong.  If your system headers have a conflicting prototype,
> you will lose, regardless of what compiler you're using.
> 
> Do you really not have a prototype for basename?
> 
> -- 
> Daniel Jacobowitz
> CodeSourcery, LLC

Yes, I have a prototype for basename on IA64 HP-UX.  It is in
/usr/include/libgen.h:

extern char *basename(char *);

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.

The problem I was trying to avoid is with PA HP-UX.  It has the same
prototype but if someone is trying to build binutils with the bundled
HP-UX compiler, that compiler doesn't handle prototypes.  It is an old
K&R compiler that is really just intended to be used to rebuild the
kernel.  The real HP compiler that people can buy is, of course, a full
ANSI C compiler.  But it looks like we require a full ANSI compiler to
build binutils now, I see all the uses of PARAM are gone now so I guess
I don't need to worry about that scenario anymore.

So should I just add __hpux__ to the list of OS's or is the difference
between 'char *' and 'const char *' going to bite me somewhere that I
haven't seen yet?

Steve Ellcey
sje@cup.hp.com


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