Autoconf 2.59 breaks libstdc++ checks
Gunther Nikl
gni@gecko.de
Thu May 6 12:00:00 GMT 2004
On Thu, May 06, 2004 at 01:09:07AM +0200, Andreas Schwab wrote:
> Kean Johnston <jkj@sco.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). A similiar problem exists with putchar which is also
only available as a macro but GCC 3.3 or later might generate code that
references it.
BTW, is it legal to implement these macros as functions using the macros
itself?
#include <stdio.h>
int (getc)(FILE *stream) { return getc(stream); }
This will break if getc isn't a macro.
Gunther
More information about the Gcc
mailing list