From de483074e6ed8b76c2365a1b7881f73fa54c815c Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 16 Mar 2013 11:44:34 -0700 Subject: [PATCH] Cleanup for build on VMS --- sim_serial.c | 4 ++-- sim_sock.h | 6 ++++++ sim_timer.c | 6 +++--- sim_tmxr.c | 6 +++--- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sim_serial.c b/sim_serial.c index cc861569..b291f627 100644 --- a/sim_serial.c +++ b/sim_serial.c @@ -1732,8 +1732,8 @@ if (status != SS$_NORMAL) { } if (devsts & UCB$M_BSY) return 0; /* Would block */ -status = sys$qio (0, port, IO$_WRITELBLK | IO$M_NOFORMAT, - NULL, 0, 0, buffer, count, 0, 0, 0, 0); +status = sys$qiow (0, port, IO$_WRITELBLK | IO$M_NOFORMAT, + NULL, 0, 0, buffer, count, 0, 0, 0, 0); if (status != SS$_NORMAL) { sim_error_serial ("write", status); /* report unexpected error */ return -1; diff --git a/sim_sock.h b/sim_sock.h index 03903b07..9befed49 100644 --- a/sim_sock.h +++ b/sim_sock.h @@ -75,6 +75,12 @@ #if !defined (timerclear) #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #endif +#if !defined (AI_NUMERICHOST) +#define AI_NUMERICHOST 0 +#endif +#if defined (__VAX) +#define sockaddr_storage sockaddr +#endif #endif #if defined(__EMX__) /* OS/2 unique */ #if !defined (timerclear) diff --git a/sim_timer.c b/sim_timer.c index aab25158..2d86223b 100644 --- a/sim_timer.c +++ b/sim_timer.c @@ -701,10 +701,10 @@ return (sim_idle_rate_ms != 0); /* sim_timer_idle_capable - tell if the host is Idle capable and what the host OS tick size is */ -uint32 sim_timer_idle_capable (uint32 *hoat_tick_ms) +uint32 sim_timer_idle_capable (uint32 *host_tick_ms) { -if (hoat_tick_ms) - *hoat_tick_ms = sim_os_sleep_min_ms; +if (host_tick_ms) + *host_tick_ms = sim_os_sleep_min_ms; return sim_idle_rate_ms; } diff --git a/sim_tmxr.c b/sim_tmxr.c index e66dfbfd..4a57931b 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -2340,9 +2340,9 @@ while (sim_asynch_enabled) { lp->a_active = TRUE; pthread_mutex_unlock (&sim_tmxr_poll_lock); term[0] = term[1] = 0; - status = sys$qio (0, lp->serport, - IO$_READLBLK | IO$M_NOECHO | IO$M_NOFILTR | IO$M_TIMED | IO$M_TRMNOECHO, - &iosb, 0, 0, buf, 1, 1, term, 0, 0); + status = sys$qiow (0, lp->serport, + IO$_READLBLK | IO$M_NOECHO | IO$M_NOFILTR | IO$M_TIMED | IO$M_TRMNOECHO, + &iosb, 0, 0, buf, 1, 1, term, 0, 0); if (status != SS$_NORMAL) { fprintf (stderr, "_tmxr_serial_line_poll() - QIO Failed, Status=%d\r\n", status); abort();