Prevent macro expansion of mblen
Alexandre Oliva
aoliva@redhat.com
Mon Dec 25 13:11:00 GMT 2000
On Dec 22, 2000, Benjamin Kosnik <bkoz@redhat.com> wrote:
>> 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.
Indeed. Here's a revised patch. Ok to install?
> 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.
Unfortunately, that's not the case. The macro is defined whenever the
function is declared. Or so it seems to me.
More information about the Libstdc++
mailing list