diff --git a/descrip.mms b/descrip.mms index a0283606..f2d38775 100644 --- a/descrip.mms +++ b/descrip.mms @@ -316,7 +316,7 @@ ATT3B2_SOURCE = $(ATT3B2_DIR)3B2_CPU.C,$(ATT3B2_DIR)3B2_DMAC.C,\ $(ATT3B2_DIR)3B2_IO.C,$(ATT3B2_DIR)3B2_IU.C,\ $(ATT3B2_DIR)3B2_MMU.C,$(ATT3B2_DIR)3B2_SYS.C,\ $(ATT3B2_DIR)3B2_SYSDEV.C -ALTAIR_OPTIONS = /INCL=($(SIMH_DIR),$(ATT3B2_DIR))/DEF=($(CC_DEFS)) +ATT3B2_OPTIONS = /INCL=($(SIMH_DIR),$(ATT3B2_DIR))/DEF=($(CC_DEFS)) # MITS Altair Simulator Definitions. # diff --git a/sim_defs.h b/sim_defs.h index e3d09f25..b0129533 100644 --- a/sim_defs.h +++ b/sim_defs.h @@ -115,6 +115,10 @@ #if defined(_MSC_VER) && (_MSC_VER < 1900) #define snprintf _snprintf /* poor man's snprintf which will work most of the time but has different return value */ #endif +#if defined(__VAX) +extern int sim_vax_snprintf(char *buf, size_t buf_size, const char *fmt, ...); +#define snprintf sim_vax_snprintf +#endif #include #include #include diff --git a/sim_fio.c b/sim_fio.c index 2f77b3d8..d05e18f3 100644 --- a/sim_fio.c +++ b/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