forked from OSchip/llvm-project
parent
b4f65501fc
commit
416463f7f3
|
@ -105,7 +105,11 @@ std::string DocumentXML::escapeString(const char* pStr,
|
|||
if (isprint(C))
|
||||
value += C;
|
||||
else {
|
||||
#ifdef LLVM_ON_WIN32
|
||||
sprintf(buffer, "\\%03o", C);
|
||||
#else
|
||||
snprintf(buffer, sizeof(buffer), "\\%03o", C);
|
||||
#endif
|
||||
value += buffer;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -498,8 +498,13 @@ static void ComputeDATE_TIME(SourceLocation &DATELoc, SourceLocation &TIMELoc,
|
|||
};
|
||||
|
||||
char TmpBuffer[32];
|
||||
#ifdef LLVM_ON_WIN32
|
||||
sprintf(TmpBuffer, "\"%s %2d %4d\"", Months[TM->tm_mon], TM->tm_mday,
|
||||
TM->tm_year+1900);
|
||||
#else
|
||||
snprintf(TmpBuffer, sizeof(TmpBuffer), "\"%s %2d %4d\"", Months[TM->tm_mon], TM->tm_mday,
|
||||
TM->tm_year+1900);
|
||||
#endif
|
||||
|
||||
Token TmpTok;
|
||||
TmpTok.startToken();
|
||||
|
|
Loading…
Reference in New Issue