Hi,

On 29 Oct 2003 19:36:57 +0800, Gerrit Voss <[EMAIL PROTECTED]> wrote:

Hi.

On Wed, 2003-10-29 at 19:01, Haykel Ben Djemia wrote:
Hi,

in OpenSG/Source/Experimental/NewAction/ActorCodeGen/OSGActorWriter.cpp
string::compare(int, int, char*) is used, which is OK for new libstdc++
releases under linux. But the libstdc++-2.96 delivered with RedHat 7.3
has the following definition: string::compare(char*, int, int). For
support reasons for our E&S cluster we have to use RedHat 7.3. For the
moment I compiled OpenSG by changing every strLine.compare(0, n, "text")
with strLine.compare("text"). Could you make these changes in the
OpenSG-Source and take care of it in the future or is this problematic
for some reason?

no reason I can see without having checked that the first parameter is
always 0 ;-) if this is the case Carsten will handle the details ;-)).

alright, the first arg is always 0, but I don't like the proposed solution. Consider this:

if(strLine.compare(0,5, "@@Bar") == 0) // this means the line starts exactly with @@Bar

vs.

if(strLine.compare("@@Bar") >= 0) // this means the line starts with anything lexicographically ordered after @@Bar, e.g. @@Foo

I don't like testing with == in the second case either, as this would not work on lines that have trailing whitespace for example.

If not it will be a little bit trickier as I don't like to sprinkle the
code with a lot of ifdefs ;-)

Well, ActorWriter already has a workaround member function for the missing strcasecmp on win32, I'd add another one for the string::compare problem, but I don't know which defines to test.

Carsten



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to