www.digitalmars.com         C & C++   DMDScript  

c++ - strchr() non-standard?

reply "Matthew" <nowhere noaddress.co.us> writes:
I'm having trouble with DMC++ because string.h defines non-standard 
overloads of strchr() (and others).

Using -A then fails in STLport's cwchar

Is there a reason for the non-standard definitions? Is it safe to assume 
they will not be persist as is, so I can be confident of a DMC++-specific 
workaround?

Cheers

Matthew 
Apr 29 2006
parent reply Walter Bright <newshound digitalmars.com> writes:
Matthew wrote:
 I'm having trouble with DMC++ because string.h defines non-standard 
 overloads of strchr() (and others).
 
 Using -A then fails in STLport's cwchar
 
 Is there a reason for the non-standard definitions? Is it safe to assume 
 they will not be persist as is, so I can be confident of a DMC++-specific 
 workaround?
For a workaround for now, just drop using -A.
May 01 2006
parent "Matthew" <nowhere noaddress.co.us> writes:
"Walter Bright" <newshound digitalmars.com> wrote in message 
news:e34iuh$1pdu$1 digitaldaemon.com...
 Matthew wrote:
 I'm having trouble with DMC++ because string.h defines non-standard 
 overloads of strchr() (and others).

 Using -A then fails in STLport's cwchar

 Is there a reason for the non-standard definitions? Is it safe to assume 
 they will not be persist as is, so I can be confident of a DMC++-specific 
 workaround?
For a workaround for now, just drop using -A.
The problem was when -A was not used; the STLport problem arises when -A was used. I've just worked around it by implementing an shwild_strchr() function, whose return type and calling convention I have total control of, for taking the address of.
May 01 2006