Bug 1935 - Wrong declarations in libiberty.h, don't match to glibc's declarations
Summary: Wrong declarations in libiberty.h, don't match to glibc's declarations
Status: RESOLVED WONTFIX
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.16
: P3 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-28 09:07 UTC by Marc Wäckerlin
Modified: 2005-12-06 01:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Wäckerlin 2005-11-28 09:07:50 UTC
The declarations in libiberty.h do not match the declarations from glibc:

/usr/include/libiberty.h:98: error: declaration of ‘char* basename(const char*)’
throws different exceptions
/usr/include/string.h:387: error: than previous declaration ‘char*
basename(const char*) throw ()’
/usr/include/libiberty.h:523: error: declaration of ‘int asprintf(char**, const
char*, ...)’ throws different exceptions
/usr/include/stdio.h:374: error: than previous declaration ‘int asprintf(char**,
const char*, ...) throw ()’
/usr/include/libiberty.h:530: error: declaration of ‘int vasprintf(char**, const
char*, char*)’ throws different exceptions
/usr/include/stdio.h:368: error: than previous declaration ‘int
vasprintf(char**, const char*, char*) throw ()’

The involved RPM Packages (versions):

> rpm -qf /usr/include/libiberty.h /usr/include/string.h /usr/include/stdio.h
/usr/include/stdio.h
binutils-2.16.91.0.2-8
glibc-devel-2.3.5-40
glibc-devel-2.3.5-40
glibc-devel-2.3.5-40
Comment 1 H.J. Lu 2005-12-06 01:15:04 UTC
When you include /usr/include/libiberty.h, you should define proper macros,
like HAVE_DECL_BASENAME, HAVE_DECL_ASPRINTF, .., to avoid this.