mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
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:
parent
05f227606f
commit
cd36741010
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user