This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Prevent macro expansion of mblen


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]