This is the mail archive of the
mailing list for the GCC project.
Re: Autoconf 2.59 breaks libstdc++ checks
Gunther Nikl writes:
> On Thu, May 06, 2004 at 01:09:07AM +0200, Andreas Schwab wrote:
> > Kean Johnston <email@example.com> writes:
> > > The problem is the new code there does a #undef $1. This is
> > > what is breaking things, and its wrong. It is a perfectly
> > > valid thing for an OS to use #define to implement some function
> > > in terms of another.
> > But unless stated otherwise, all functions in the C library are also
> > required to be provided as indentifiers with external linkage.
> What about getc, putc and putchar from stdio? The man page from FreeBSD
> states these are macros. I am getting linker errors because libstdc++.a
> has references to getc/putc but both exist as macro only (an ANSI/ISO C
> library on AmigaOS).
Then that AmigaOS ANSI/ISO C library is broken. If you look at
Section 7.1.4, "Use of library functions", you'll see that it's legal
for a program to use "#undef getc" to ensure that an actual function
is available for getc.