From 2e8d79cc6184acd05c72020c9b989d2c5a0ec15c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 24 Oct 1995 05:36:00 +0000 Subject: [PATCH] Changes to allow Win32 microcode to be compiled by the Watcom C compiler. --- v7/src/microcode/ntutl/ntgui.rc | 6 ++++-- v7/src/microcode/ntutl/scheme31.c | 21 +++++++++++++++++++-- v7/src/microcode/ntutl/scheme32.c | 17 +++++++++++++---- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/v7/src/microcode/ntutl/ntgui.rc b/v7/src/microcode/ntutl/ntgui.rc index 6d33fcf82..0f00af773 100644 --- a/v7/src/microcode/ntutl/ntgui.rc +++ b/v7/src/microcode/ntutl/ntgui.rc @@ -52,6 +52,8 @@ BEGIN END END +#ifdef __WATCOMC__ +#include "ntdialog.dlg" +#else RCINCLUDE NTDIALOG.DLG - - +#endif diff --git a/v7/src/microcode/ntutl/scheme31.c b/v7/src/microcode/ntutl/scheme31.c index 4417a4b44..bc5092b5b 100644 --- a/v7/src/microcode/ntutl/scheme31.c +++ b/v7/src/microcode/ntutl/scheme31.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: scheme31.c,v 1.5 1993/09/13 18:41:24 gjr Exp $ +$Id: scheme31.c,v 1.6 1995/10/24 05:34:23 cph Exp $ -Copyright (c) 1993 Massachusetts Institute of Technology +Copyright (c) 1993-95 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -41,6 +41,8 @@ MIT in each case. */ /* Utilities */ +#ifdef CL386 + unsigned short getCS (void) { @@ -58,6 +60,21 @@ getSS (void) { _asm mov ax,ss } + +#else /* not CL386 */ +#ifdef __WATCOMC__ + +extern unsigned short getCS (void); +#pragma aux getCS = "mov ax,cs" value [ax]; + +extern unsigned short getDS (void); +#pragma aux getDS = "mov ax,ds" value [ax]; + +extern unsigned short getSS (void); +#pragma aux getSS = "mov ax,ss" value [ax]; + +#endif /* __WATCOMC__ */ +#endif /* not CL386 */ static UT32PROC call_16_bit_code = NULL; diff --git a/v7/src/microcode/ntutl/scheme32.c b/v7/src/microcode/ntutl/scheme32.c index 3111e1e75..059d07d5c 100644 --- a/v7/src/microcode/ntutl/scheme32.c +++ b/v7/src/microcode/ntutl/scheme32.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: scheme32.c,v 1.7 1993/09/13 18:40:22 gjr Exp $ +$Id: scheme32.c,v 1.8 1995/10/24 05:36:00 cph Exp $ -Copyright (c) 1993 Massachusetts Institute of Technology +Copyright (c) 1993-95 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -48,8 +48,9 @@ win32_under_win32s_p (void) char * win32_allocate_heap (unsigned long size, unsigned long * handle) { +#ifdef CL386 extern char * malloc (unsigned long); - +#endif * handle = 0L; return ((char *) (malloc (size))); } @@ -95,7 +96,15 @@ struct win32_timer_closure_s HWND window; }; -static void _stdcall +#ifdef CL386 +#define __STDCALL _stdcall +#endif + +#ifdef __WATCOMC__ +#define __STDCALL __stdcall +#endif + +static void __STDCALL win32_nt_timer_tick (UINT wID, UINT wMsg, DWORD dwUser, DWORD dw1, DWORD dw2) { struct win32_timer_closure_s * scm_timer = -- 2.25.1