This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Autoconf 2.59 breaks libstdc++ checks
- From: Gunther Nikl <gni at gecko dot de>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Kean Johnston <jkj at sco dot com>, GCC development group <gcc at gcc dot gnu dot org>
- Date: Thu, 6 May 2004 13:55:49 +0200
- Subject: Re: Autoconf 2.59 breaks libstdc++ checks
- References: <4099680D.5070003@sco.com> <je8yg6v5d8.fsf@sykes.suse.de>
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