mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Update out_of_memory stub function for utils.c test
(cherry picked from commit 056288677b
)
This commit is contained in:
parent
609e527d6d
commit
9dd00020ae
17
utils.c
17
utils.c
@ -182,10 +182,21 @@ int main(void)
|
|||||||
printf("passed %d failed %d total %d\n", passes, fails, passes+fails);
|
printf("passed %d failed %d total %d\n", passes, fails, passes+fails);
|
||||||
return fails != 0 ? 1 : 0;
|
return fails != 0 ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stubs to stop the rest of this module causing compile failures. */
|
/* Stubs to stop the rest of this module causing compile failures. */
|
||||||
void modalfatalbox(const char *fmt, ...) {}
|
static NORETURN void fatal_error(const char *p, ...)
|
||||||
int conf_get_int(Conf *conf, int primary) { return 0; }
|
{
|
||||||
char *conf_get_str(Conf *conf, int primary) { return NULL; }
|
va_list ap;
|
||||||
|
fprintf(stderr, "host_string_test: ");
|
||||||
|
va_start(ap, p);
|
||||||
|
vfprintf(stderr, p, ap);
|
||||||
|
va_end(ap);
|
||||||
|
fputc('\n', stderr);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void out_of_memory(void) { fatal_error("out of memory"); }
|
||||||
|
|
||||||
#endif /* TEST_HOST_STRFOO */
|
#endif /* TEST_HOST_STRFOO */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user