mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
Issue #1319 - Remove stderr_to_file.
This local-debug function is only useful for Android to work around issues with logspewing and should never be in production builds anyway.
This commit is contained in:
parent
47e85541f1
commit
d28c0b15a6
2 changed files with 0 additions and 51 deletions
|
|
@ -321,30 +321,6 @@ set_stderr_callback(StderrCallback aCallback)
|
|||
sStderrCallback = aCallback;
|
||||
}
|
||||
|
||||
#if defined(ANDROID) && !defined(RELEASE_OR_BETA)
|
||||
static FILE* sStderrCopy = nullptr;
|
||||
|
||||
void
|
||||
stderr_to_file(const char* aFmt, va_list aArgs)
|
||||
{
|
||||
vfprintf(sStderrCopy, aFmt, aArgs);
|
||||
}
|
||||
|
||||
void
|
||||
copy_stderr_to_file(const char* aFile)
|
||||
{
|
||||
if (sStderrCopy) {
|
||||
return;
|
||||
}
|
||||
size_t buflen = strlen(aFile) + 16;
|
||||
char* buf = (char*)malloc(buflen);
|
||||
snprintf(buf, buflen, "%s.%u", aFile, (uint32_t)getpid());
|
||||
sStderrCopy = fopen(buf, "w");
|
||||
free(buf);
|
||||
set_stderr_callback(stderr_to_file);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VA_COPY
|
||||
#define VARARGS_ASSIGN(foo, bar) VA_COPY(foo,bar)
|
||||
#elif defined(HAVE_VA_LIST_AS_ARRAY)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue