This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: Prevent macro expansion of mblen
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: Prevent macro expansion of mblen
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Fri, 22 Dec 2000 01:19:16 -0800 (PST)
- cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
> IRIX 5.2's stdlib.h defines mblen as a macro. I wonder whether we
> should just #ifdef the declaration out in this case, or define
> std::(mblen) as an inline function that expands the macro, or do as
> the patch below (mblen is available as a function, despite the
> existence of the macro).
Hmm. Not ok to install. Of the options you presented, making an inline
function that expands the macro and then undefs the define is preferred.
However, what might be best, which as not presented as an option is: if
mblen is available as a function and
as a macro, and which is used depends on a macro, then toggle that macro
in config/os/irix/bits/os_defines.h so that you only get the function,
and not the macro.
Then undef the macro.
-benjamin