Another HP-UX IA64 Build patch
James E Wilson
wilson@specifixinc.com
Thu May 5 18:12:00 GMT 2005
On Thu, 2005-05-05 at 10:51, Steve Ellcey wrote:
> 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. Try "man basename" on a linux system, and it
will tell you that there are two versions of basename. The posix one
which takes a char * argument, and a glibc _GNU_SOURCE one which takes a
const char * argument. So this probably should be something like
#if defined(_GNU_SOURCE)
extern char *basename (const char *);
#elif defined...
extern char *basename (char *);
#else
extern char *basename ();
#endif
But it appears that nobody is including libgen.h anywhere, or we would
have caught this before.
For now, I think just adding __hpux__ to the list is fine, and we can
worry about the wrong prototype later, when and if it causes a problem.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Binutils
mailing list