Bug 1017911 - DMD: don't use alloca(), because it's a pain to get working on multiple platforms. r=mccr8.

DONTBUILD because DMD is NPOTB.

--HG--
extra : rebase_source : 0b400b76583032f30a9a4b8c935b03c015fc9772
This commit is contained in:
Nicholas Nethercote 2014-05-29 17:04:23 -07:00
parent 05f227606f
commit cd36741010

View File

@ -6,7 +6,6 @@
#include "DMD.h"
#include <alloca.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
@ -179,9 +178,10 @@ StatusMsg(const char* aFmt, ...)
__android_log_vprint(ANDROID_LOG_INFO, "DMD", aFmt, ap);
#else
// The +64 is easily enough for the "DMD[<pid>] " prefix and the NUL.
char* fmt = (char*) alloca(strlen(aFmt) + 64);
char* fmt = (char*) InfallibleAllocPolicy::malloc_(strlen(aFmt) + 64);
sprintf(fmt, "DMD[%d] %s", getpid(), aFmt);
vfprintf(stderr, fmt, ap);
InfallibleAllocPolicy::free_(fmt);
#endif
va_end(ap);
}