From: Hartmut Kaiser (hartmutkaiser_at_[hidden])
Date: 2004-01-14 04:48:23


 
Russell Hind wrote:

> std::strcmp will fail to compile on these compilers in a
> release build mode. Works fine in debug mode. The solution
> is to just call strcmp in a release build. This occurs in
>
> operations_posix_windows.cpp for filesystem at lines
>
> 234,235,271,272.
>
> Could a work-around be provided. I've locally changed lines
> at 234-235 to be
>
> #if defined(__BORLANDC__) && (__BORLANDC__ <= 0x564) &&
> !defined(_DEBUG)
> if ( strcmp( name, "." ) != 0
> && strcmp( name, ".." ) != 0 )
> #else
> if ( std::strcmp( name, "." ) != 0
> && std::strcmp( name, ".." ) != 0 )
> #endif
>
> But am unsure of the work-around syntax to use this
> correctly. The same work-around can be applied at 271-272 also.

I would write it as:

    using namespace std;
    if ( strcmp( name, "." ) != 0
      && strcmp( name, ".." ) != 0 )
...

This will do for all systems, regardless, if strcmp is in namespace std or
not.

Regards Hartmut