diff --git a/checkmemoryleak.cpp b/checkmemoryleak.cpp index c929ea186..deab72978 100644 --- a/checkmemoryleak.cpp +++ b/checkmemoryleak.cpp @@ -32,9 +32,6 @@ #include #endif -#ifndef _MSC_VER -#define _strdup(str) strdup(str) -#endif //--------------------------------------------------------------------------- diff --git a/token.cpp b/token.cpp index d95671daa..94198eb81 100644 --- a/token.cpp +++ b/token.cpp @@ -49,11 +49,7 @@ void TOKEN::setstr( const char s[] ) { _str = s; std::free(_cstr); -#ifndef _MSC_VER _cstr = strdup(s); -#else - _cstr = _strdup(s); -#endif _isName = bool(_str[0]=='_' || isalpha(_str[0])); _isNumber = bool(isdigit(_str[0]) != 0); if( _str == "true" || _str == "false" ) diff --git a/tokenize.cpp b/tokenize.cpp index 205d5b587..7eef56cc4 100644 --- a/tokenize.cpp +++ b/tokenize.cpp @@ -42,11 +42,6 @@ #include #endif -#ifndef _MSC_VER -#define _strdup(str) strdup(str) -#endif - - //--------------------------------------------------------------------------- @@ -117,7 +112,7 @@ void Tokenizer::Define(const char Name[], const char Value[]) if (!dec && !hex) return; - char *strValue = _strdup(Value); + char *strValue = strdup(Value); if (!dec && hex) { @@ -128,12 +123,12 @@ void Tokenizer::Define(const char Name[], const char Value[]) std::ostringstream ostr; ostr << value; free(strValue); - strValue = _strdup(ostr.str().c_str()); + strValue = strdup(ostr.str().c_str()); } DefineSymbol *NewSym = new DefineSymbol; memset(NewSym, 0, sizeof(DefineSymbol)); - NewSym->name = _strdup(Name); + NewSym->name = strdup(Name); NewSym->value = strValue; NewSym->next = _dsymlist; _dsymlist = NewSym;