This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Another HP-UX IA64 Build patch
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: drow at false dot org
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 5 May 2005 10:51:53 -0700 (PDT)
- Subject: 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