1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

VMS Build: Restore VAX/VMS host build support

The C RTL on the latest VAX/VMS does not provide a snprintf function.
We provide a 'basic' one which meets the needs of simh as suggested
by Jordi Guillaumes Pons.
This commit is contained in:
Mark Pizzolato
2017-12-09 11:21:38 -08:00
parent 9b1f44f787
commit 6487d319cd
3 changed files with 22 additions and 1 deletions

View File

@@ -599,3 +599,20 @@ free (shmem);
}
#endif
#if defined(__VAX)
/*
* We privide a 'basic' snprintf, which 'might' overrun a buffer, but
* the actual use cases don't on other platforms and none of the callers
* care about the function return value.
*/
int sim_vax_snprintf(char *buf, size_t buf_size, const char *fmt, ...)
{
va_list arglist;
va_start (arglist, fmt);
vsprintf (buf, fmt, arglist);
va_end (arglist);
return 0;
}
#endif