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:
17
sim_fio.c
17
sim_fio.c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user