[Libreoffice] First build error: segmentation fault on vcl

Jesús Corrius jesus at softcatala.org
Fri Oct 29 03:49:01 PDT 2010


On Fri, Oct 29, 2010 at 12:00 PM, Caolán McNamara <caolanm at redhat.com> wrote:
> On Fri, 2010-10-29 at 11:56 +0200, Jesús Corrius wrote:
>> but I have a couple of questions about it:
>>
>> 1. We basically have two options here: use _STL::remove or
>> ::std::remove. My first version of the patch was using _STL::remove,
>> but I think the plan is to get rid of STLPort in the future, so the
>> second option would be better.
>
> Yes use std::remove/::std::remove. stlport redefines "stl" to be "_STL"
> which is why that symbol name might appear in warnings or linker time
> errors. Avoid "_STL" if at all possible :-)
>
>> 2. I can make the changes for all platforms or just put it inside some
>> ifdefs. In the later case, we are sure that nothing will break.
>
> Nah, I say avoid the ifdefs if possible. I don't mind picking up a few
> temporary build-time breakages which are quick and easy to fix with some
> extra includes of namespacing rather than end up with masses of ifdefs.

I have checked the offending code and it's always like this:

#if defined(_MSC_VER) && (_MSC_VER > 1310) && (_MSC_VER < 1500)
             remove(
 #else
             std::remove(

So it's already always std::remove in all platforms except Windows. I
will build the code with Visual Studio 2008 this evening and try to
see why can't also be std::remove there. That would be perfect and fix
the porting issue.


-- 
Jesús Corrius <jesus at softcatala.org>
Document Foundation founding member
Skype: jcorrius | Twitter: @jcorrius


More information about the LibreOffice mailing list