From 70c953750ca55fa05b4b44f8acbce8009be660f7 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 14 Apr 1998 05:13:58 +0000 Subject: [PATCH] Changes to get microcode working when compiled with Microsoft Visual C++ version 5.0. --- v7/src/microcode/ansidecl.h | 38 ++- v7/src/microcode/intprm.c | 9 +- v7/src/microcode/ntfile.c | 6 +- v7/src/microcode/ntgui.c | 184 ++++--------- v7/src/microcode/ntio.c | 22 +- v7/src/microcode/ntproc.c | 5 +- v7/src/microcode/ntscreen.c | 8 +- v7/src/microcode/ntsock.c | 7 +- v7/src/microcode/ntutl/makefile | 439 +++++++++++++++----------------- v7/src/microcode/option.c | 8 +- v7/src/microcode/oscond.h | 12 +- v7/src/microcode/outf.c | 6 +- v7/src/microcode/posixtyp.h | 6 +- v7/src/microcode/prntio.c | 7 +- v7/src/microcode/utils.c | 8 +- 15 files changed, 338 insertions(+), 427 deletions(-) diff --git a/v7/src/microcode/ansidecl.h b/v7/src/microcode/ansidecl.h index b295c1e1e..64f811d47 100644 --- a/v7/src/microcode/ansidecl.h +++ b/v7/src/microcode/ansidecl.h @@ -1,7 +1,7 @@ /* Copyright (C) 1990 Free Software Foundation, Inc. This file is part of the GNU C Library. -$Id: ansidecl.h,v 1.5 1996/10/02 18:56:19 cph Exp $ +$Id: ansidecl.h,v 1.6 1998/04/14 05:10:54 cph Exp $ The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,16 +54,29 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ so they will all get the switch for lint. */ /* LINTLIBRARY */ -/* We must test for __IBMC__ everywhere that we test for __STDC__ - because the IBM C compiler for OS/2 does not define __STDC__ even - though it is an ANSI C compiler. The compiler defines __STDC__ - only when the compiler is put into "strict ANSI" mode, in which - numerous useful features are disabled. It used to be the case that - this could be fixed by forcibly defining __STDC__, but as of - version 3.0 that is no longer allowed. What these fascists hope to - gain by this, besides angering programmers, is unclear. */ +/* Some other compilers, specifically the Windows and OS/2 compilers, + define __STDC__ only when the compiler is put into "strict ANSI" + mode, in which numerous useful features are disabled. So we have + reconditionalized these macros so that the stdc bindings can be + used for those compilers. */ -#if defined(__STDC__) || defined(__IBMC__) || defined(CL386) +#ifdef __STDC__ +#define USE_STDC_BINDINGS +#endif + +#ifdef __IBMC__ +#define USE_STDC_BINDINGS +#endif + +#ifdef CL386 +#define USE_STDC_BINDINGS +#endif + +#ifdef _MSC_VER +#define USE_STDC_BINDINGS +#endif + +#ifdef USE_STDC_BINDINGS #define PTR void * #define PTRCONST void *CONST @@ -91,7 +104,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define DEFUN(name, arglist, args) name(args) #define DEFUN_VOID(name) name(NOARGS) -#else /* Not ANSI C. */ +#else /* not USE_STDC_BINDINGS */ #define PTR char * #define PTRCONST PTR @@ -108,7 +121,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define DEFUN(name, arglist, args) name arglist args; #define DEFUN_VOID(name) name() -#endif /* ANSI C. */ - +#endif /* not USE_STDC_BINDINGS */ #endif /* ansidecl.h */ diff --git a/v7/src/microcode/intprm.c b/v7/src/microcode/intprm.c index 4cc6a3c6c..8d43772a4 100644 --- a/v7/src/microcode/intprm.c +++ b/v7/src/microcode/intprm.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: intprm.c,v 1.7 1997/04/28 07:20:33 cph Exp $ +$Id: intprm.c,v 1.8 1998/04/14 05:13:07 cph Exp $ -Copyright (c) 1989-97 Massachusetts Institute of Technology +Copyright (c) 1989-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -215,7 +215,8 @@ Converts the list to an integer. NEGATIVE? specifies the sign.") SCHEME_OBJECT digits = (ARG_REF (1)); unsigned long radix = (arg_ulong_integer (2)); unsigned int n_digits; - if ((radix < 2) || (radix >= (bignum_max_digit_stream_radix ()))) + if ((radix < 2) + || (radix >= ((unsigned long) (bignum_max_digit_stream_radix ())))) error_bad_range_arg (2); { SCHEME_OBJECT scan = digits; @@ -225,7 +226,7 @@ Converts the list to an integer. NEGATIVE? specifies the sign.") SCHEME_OBJECT digit = (PAIR_CAR (scan)); if (!UNSIGNED_FIXNUM_P (digit)) error_wrong_type_arg (1); - if ((UNSIGNED_FIXNUM_TO_LONG (digit)) >= radix) + if (((unsigned long) (UNSIGNED_FIXNUM_TO_LONG (digit))) >= radix) error_bad_range_arg (1); n_digits += 1; scan = (PAIR_CDR (scan)); diff --git a/v7/src/microcode/ntfile.c b/v7/src/microcode/ntfile.c index b781dc88f..a9e29ffa2 100644 --- a/v7/src/microcode/ntfile.c +++ b/v7/src/microcode/ntfile.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: ntfile.c,v 1.11 1997/10/24 07:24:39 cph Exp $ +$Id: ntfile.c,v 1.12 1998/04/14 05:13:16 cph Exp $ -Copyright (c) 1992-97 Massachusetts Institute of Technology +Copyright (c) 1992-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -142,6 +142,6 @@ OS_file_set_position (Tchannel channel, off_t position) = (SetFilePointer ((CHANNEL_HANDLE (channel)), position, 0, FILE_BEGIN)); if (old_position == 0xFFFFFFFF) NT_error_api_call ((GetLastError ()), apicall_SetFilePointer); - if (old_position != position) + if (old_position != ((DWORD) position)) error_external_return (); } diff --git a/v7/src/microcode/ntgui.c b/v7/src/microcode/ntgui.c index df0fa150c..f32b1ca23 100644 --- a/v7/src/microcode/ntgui.c +++ b/v7/src/microcode/ntgui.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: ntgui.c,v 1.20 1997/06/26 06:59:20 cph Exp $ +$Id: ntgui.c,v 1.21 1998/04/14 05:13:19 cph Exp $ -Copyright (c) 1993-97 Massachusetts Institute of Technology +Copyright (c) 1993-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -214,7 +214,6 @@ catatonia_trigger (void) exit (1); else { - extern void termination_normal (int); already_exitting = TRUE; termination_normal (0); } @@ -641,154 +640,75 @@ DEFINE_PRIMITIVE ("NT:SEND-MESSAGE", Prim_send_message, 4, 4, long_to_integer (SendMessage (hwnd, message, wParam, lParam))); } -// Indirect calls to a __stdcall procedure are compiled as if to a _cdecl -// procedure. The result is disaster. The fudge_calls give us some -// protection because the procedure entry code pushes registers. These -// get trampled, but with luck the values saved were not live. -// -//static long fudge_call_1 (long (* WINAPI f)(long), long a) -//{ -// return f(a); -//} -// -//DEFINE_PRIMITIVE ("CALL-FF-1", Prim_call_ff_1, 2, 2, 0) -//{ -// long result; -// long (* WINAPI f)(long); -// PRIMITIVE_HEADER (2); -// -// f = arg_integer (1); -// result = fudge_call_1 (f, call_ff_arg (ARG_REF (2))); -// -// PRIMITIVE_RETURN (long_to_integer (result)); -//} -// -//static long fudge_call_2 (long (* WINAPI f)(long,long), long a1, long a2) -//{ -// return f(a1,a2); -//} -// -//DEFINE_PRIMITIVE ("CALL-FF-2", Prim_call_ff_2, 3, 3, 0) -//{ -// long (* WINAPI f)(long,long); -// -// PRIMITIVE_HEADER (3); -// -// f = arg_integer (1); -// PRIMITIVE_RETURN -// (long_to_integer (fudge_call_2 (f, -// call_ff_arg (ARG_REF(2)), -// call_ff_arg (ARG_REF(3))))); -//} -// -//static long fudge_call_3 (long (* WINAPI f)(long,long,long), -// long a1, long a2, long a3) -//{ -// return f(a1,a2,a3); -//} -// -//DEFINE_PRIMITIVE ("CALL-FF-3", Prim_call_ff_3, 4, 4, 0) -//{ -// long (*f)(long,long,long); -// long result; -// -// PRIMITIVE_HEADER (4); -// -// f = arg_integer (1); -// result = fudge_call_3 (f, -// call_ff_arg(ARG_REF(2)), -// call_ff_arg(ARG_REF(3)), -// call_ff_arg(ARG_REF(4))); -// PRIMITIVE_RETURN (long_to_integer (result)); -//} +static SCHEME_OBJECT call_ff_really (void); + +DEFINE_PRIMITIVE ("CALL-FF", Prim_call_ff, 0, LEXPR, 0) +{ + /* This indirection saves registers correctly in this stack frame + rather than in a bad position in relation to the bogus C argument + stack. */ + PRIMITIVE_HEADER (LEXPR); + PRIMITIVE_RETURN (call_ff_really ()); +} static SCHEME_OBJECT call_ff_really (void) { - { - /* use a struct for locals that live across the foreign function call - so that their position in the stack is the right end of the stack - frame with respect to the stacked C arguments */ - struct { - long c_args[50]; - long old_esp; - } local; - - long result; - - /* We save the stack pointer and restore it because the called function - may pop the arguments (pascal/__stdcall) or expect us to (__cdecl). */ - - /* The stack pointer is saved in a static variable so that we can find - it if the compiler does SP-relative addressing with a broken SP */ - - /* The implication is that things will break if this gets overwritten. - This will happen if the foreign function directly or indirectly - allows a Scheme interrupt to be processed (eg by calling as scheme - function with interrupts enabled and that function gets rescheduled - in the threads package. */ - - static long saved_esp; - - long nargs = (LEXPR_N_ARGUMENTS ()); - if (nargs < 1) - signal_error_from_primitive (ERR_WRONG_NUMBER_OF_ARGUMENTS); - if (nargs > 30) - signal_error_from_primitive (ERR_WRONG_NUMBER_OF_ARGUMENTS); + long function_address; + SCHEME_OBJECT * argument_scan; + SCHEME_OBJECT * argument_limit; + long result; + + long nargs = (LEXPR_N_ARGUMENTS ()); + if (nargs < 1) + signal_error_from_primitive (ERR_WRONG_NUMBER_OF_ARGUMENTS); + if (nargs > 30) + signal_error_from_primitive (ERR_WRONG_NUMBER_OF_ARGUMENTS); + + function_address = (arg_integer (1)); + argument_scan = (ARG_LOC (nargs + 1)); + argument_limit = (ARG_LOC (2)); + while (argument_scan > argument_limit) { - long *arg_sp = &local.c_args[10]; - SCHEME_OBJECT *argument_scan = ARG_LOC (2); - SCHEME_OBJECT *argument_limit = ARG_LOC (nargs+1); - - long function_address = arg_integer(1); - - while (argument_scan != argument_limit) - *arg_sp++ = - scheme_object_to_windows_object (STACK_LOCATIVE_POP(argument_scan)); - - arg_sp = &local.c_args[10]; - local.old_esp = saved_esp; + long arg + = (scheme_object_to_windows_object + (STACK_LOCATIVE_PUSH (argument_scan))); #ifdef CL386 __asm { - // Important: The order of these instructions guards against - // stack pointer relative addressing. - mov eax, dword ptr [function_address] - mov dword ptr [saved_esp], esp - mov esp, dword ptr [arg_sp] - call eax - mov esp, dword ptr [saved_esp] - mov dword ptr [result], eax + push dword ptr [arg] } #else /* not CL386 */ #ifdef __WATCOMC__ { extern void call_ff_really_1 (void); -#pragma aux call_ff_really_1 = \ - "mov eax,function_address" \ - "mov saved_esp,esp" \ - "mov esp,arg_sp" \ - "call eax" \ - "mov esp,saved_esp" \ - "mov result,eax" \ - modify [eax edx ecx]; +#pragma aux call_ff_really_1 = "push arg"; call_ff_really_1 (); } #endif /* __WATCOMC__ */ #endif /* not CL386 */ - saved_esp = local.old_esp; - return long_to_integer (result); } +#ifdef CL386 + __asm + { + mov eax, dword ptr [function_address] + call eax + mov dword ptr [result], eax } -} - -DEFINE_PRIMITIVE ("CALL-FF", Prim_call_ff, 0, LEXPR, 0) -{ - /* this indirection saves registers correctly in this stack frame - rather than in a bad position in relation to the bogus C argument - stack */ - PRIMITIVE_HEADER (LEXPR); - PRIMITIVE_RETURN (call_ff_really()); +#else /* not CL386 */ +#ifdef __WATCOMC__ + { + extern void call_ff_really_2 (void); +#pragma aux call_ff_really_2 = \ + "mov eax,function_address" \ + "call eax" \ + "mov result,eax" \ + modify [eax edx ecx]; + call_ff_really_2 (); + } +#endif /* __WATCOMC__ */ +#endif /* not CL386 */ + return (long_to_integer (result)); } // diff --git a/v7/src/microcode/ntio.c b/v7/src/microcode/ntio.c index a4061f72b..97cb2ad8a 100644 --- a/v7/src/microcode/ntio.c +++ b/v7/src/microcode/ntio.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntio.c,v 1.20 1998/01/08 06:07:54 cph Exp $ +$Id: ntio.c,v 1.21 1998/04/14 05:13:24 cph Exp $ Copyright (c) 1992-98 Massachusetts Institute of Technology @@ -36,6 +36,7 @@ MIT in each case. */ #include "nt.h" #include "ntio.h" #include "osterm.h" +#include "osfile.h" #include "prims.h" #include "outf.h" #include "ossig.h" @@ -246,7 +247,8 @@ generic_channel_write (Tchannel channel, const void * buffer, DWORD n_written; STD_BOOL_API_CALL (WriteFile, - ((CHANNEL_HANDLE (channel)), buffer, n_bytes, (&n_written), 0)); + ((CHANNEL_HANDLE (channel)), ((LPCVOID) buffer), n_bytes, (&n_written), + 0)); return (n_written); } @@ -429,7 +431,8 @@ cooked_channel_write (Tchannel channel, const void * buffer, { /* Map LF to CR/LF */ static const unsigned char crlf [] = {CARRIAGE_RETURN, LINEFEED}; - const unsigned char * start = buffer; + const unsigned char * bstart = buffer; + const unsigned char * start = bstart; const unsigned char * end = (start + n_bytes); while (start < end) { @@ -443,9 +446,9 @@ cooked_channel_write (Tchannel channel, const void * buffer, = ((* (CHANNEL_CLASS_OP_WRITE (CHANNEL_CLASS (channel)))) (channel, start, n_bytes)); if (n_written < 0) - return (start - buffer); - if (n_written < n_bytes) - return ((start - buffer) + n_written); + return (start - bstart); + if (((unsigned int) n_written) < n_bytes) + return ((start - bstart) + n_written); } if (scan < end) { @@ -453,9 +456,9 @@ cooked_channel_write (Tchannel channel, const void * buffer, long n_written = ((* (CHANNEL_CLASS_OP_WRITE (CHANNEL_CLASS (channel)))) (channel, crlf, n_bytes)); - if (n_written < n_bytes) + if (n_written < ((long) n_bytes)) /* This backs out incorrectly if only CR is written out. */ - return (scan - buffer); + return (scan - bstart); } start = (scan + 1); } @@ -475,7 +478,8 @@ OS_channel_write_dump_file (Tchannel channel, const void * buffer, size_t nbytes) { DWORD scr; - return ((WriteFile (CHANNEL_HANDLE (channel), buffer, nbytes, &scr, 0)) + return ((WriteFile (CHANNEL_HANDLE (channel), ((LPCVOID) buffer), nbytes, + &scr, 0)) ? scr : 0); } diff --git a/v7/src/microcode/ntproc.c b/v7/src/microcode/ntproc.c index f887fa88d..f2809ceb9 100644 --- a/v7/src/microcode/ntproc.c +++ b/v7/src/microcode/ntproc.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntproc.c,v 1.6 1998/01/08 06:06:14 cph Exp $ +$Id: ntproc.c,v 1.7 1998/04/14 05:13:28 cph Exp $ Copyright (c) 1997-98 Massachusetts Institute of Technology @@ -163,7 +163,6 @@ NT_make_subprocess (const char * filename, SECURITY_ATTRIBUTES sap; SECURITY_DESCRIPTOR sdp; STARTUPINFO si; - PROCESS_INFORMATION pi; transaction_begin (); @@ -419,7 +418,7 @@ OS_process_status (Tprocess process) unsigned short OS_process_reason (Tprocess process) { - return (PROCESS_REASON (process)); + return ((unsigned short) (PROCESS_REASON (process))); } void diff --git a/v7/src/microcode/ntscreen.c b/v7/src/microcode/ntscreen.c index 3bbb49442..b675510bd 100644 --- a/v7/src/microcode/ntscreen.c +++ b/v7/src/microcode/ntscreen.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: ntscreen.c,v 1.32 1998/01/20 18:40:13 adams Exp $ +$Id: ntscreen.c,v 1.33 1998/04/14 05:13:31 cph Exp $ -Copyright (c) 1993-1998 Massachusetts Institute of Technology +Copyright (c) 1993-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -779,11 +779,7 @@ ScreenWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } if (hWnd == ((HWND) master_tty_window)) - { - // This is bad. We should post a quit message like nice people - extern void termination_normal (int); termination_normal (0); - } goto use_default; } diff --git a/v7/src/microcode/ntsock.c b/v7/src/microcode/ntsock.c index f4d875228..5287c2c14 100644 --- a/v7/src/microcode/ntsock.c +++ b/v7/src/microcode/ntsock.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: ntsock.c,v 1.2 1997/11/01 07:18:46 cph Exp $ +$Id: ntsock.c,v 1.3 1998/04/14 05:13:37 cph Exp $ -Copyright (c) 1997 Massachusetts Institute of Technology +Copyright (c) 1997-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -36,6 +36,7 @@ MIT in each case. */ #ifndef DISABLE_SOCKET_SUPPORT #include "scheme.h" +#include "prims.h" #include "nt.h" #include "ntio.h" #include "uxsock.h" @@ -176,7 +177,7 @@ OS_open_server_socket (unsigned int port, int arg_number) { unsigned int nb_port = (sizeof (((struct sockaddr_in *) 0) -> sin_port)); if (((sizeof (unsigned int)) > nb_port) - && (port >= (1 << (CHAR_BIT * nb_port)))) + && (port >= (1U << (CHAR_BIT * nb_port)))) error_bad_range_arg (arg_number); } transaction_begin (); diff --git a/v7/src/microcode/ntutl/makefile b/v7/src/microcode/ntutl/makefile index a5bbe53aa..761965d9d 100644 --- a/v7/src/microcode/ntutl/makefile +++ b/v7/src/microcode/ntutl/makefile @@ -1,8 +1,8 @@ ### -*- Fundamental -*- ### -### $Id: makefile,v 1.18 1996/03/23 19:24:33 adams Exp $ +### $Id: makefile,v 1.19 1998/04/14 05:13:11 cph Exp $ ### -### Copyright (c) 1992-95 Massachusetts Institute of Technology +### Copyright (c) 1992-98 Massachusetts Institute of Technology ### ### This material was developed by the Scheme project at the ### Massachusetts Institute of Technology, Department of @@ -39,54 +39,35 @@ #### Makefile for Scheme on NT !include -#cflags = $(cflags) -DDEVL=1 -D_X86_=1 - -TERMCAP_OBJECTS = nttterm.obj tparam.obj -TERMCAP_SOURCES = nttterm.c tparam.c -TERMCAP_LIBS = -GRAPHICS_SOURCES = -GRAPHICS_OBJECTS = -GRAPHICS_LIBS = -#MACHINE_SWITCHES = -3 -mx -DNO_CONST -Di386 -MACHINE_SWITCHES = -DNO_CONST -Di386 -MACHINE_SOURCES = cmpint.c cmpauxmd.asm -MACHINE_OBJECTS = cmpint.obj cmpauxmd.obj -GC_HEAD_FILES = gccode.h cmpgc.h ntscmlib.h cmpintmd.h + USER_PRIM_SOURCES = USER_PRIM_OBJECTS = USER_LIBS = -BINDIR = \scheme\nt\microcode -AS = c:\usr\lib\masm\bin\mlx /Zm /Cp /c # masm386 /z # -LDFLAGS = -cflags = $(cflags) -DMIT_SCHEME -DWINNT -DCL386 $(MACHINE_SWITCHES) -DGUI=1 -# NT compilation system for scheme (NOT utilities) -#sysflags = $(conflags) -sysflags = $(guiflags) -syslibs = $(guilibs) -cvobj = cvtomf +# **** Microsoft supplies their assembler as a separate product, and +# **** we don't currently have a copy, so use the Watcom assembler. +# Assembler options. +# +# /bt=nt build NT binary (default when host is NT) +# /d1 generate debug info +# /fpi generate in-line 387 insns, emulate if none +# /fp3 generate in-line 387 insns +# /mf use flat memory model +# /zq operate quietly +ASFLAGS = /bt=nt /d1 /fpi /fp3 /mf /zq +AS = wasm + +cflags = $(cflags) $(cvarsmt) /DMIT_SCHEME /DGUI=1 /I. -all: scheme.exe scheme31.dll scheme32.dll bchschem.exe # bintopsb.exe psbtobin.exe -# scheme16.dll has to build with a 16 bit compiler +all: scheme.exe bchschem.exe bintopsb.exe psbtobin.exe .c.obj: $(cc) $(cflags) $(cdebug) -c $*.c -# $(cc) $(cflags) -Zi -Ox -c $*.c -# $(cvobj) $*.obj - -#.c.s: -# $(CC) $(CFLAGS) -S $*.c -# .m4.asm: -# $(M4) -DTYPE_CODE_LENGTH=6 $*.m4 > $*.asm -# $(AS) $*.asm, $*.obj, nul.lst, nul.crf + .asm.obj: - $(AS) $*.asm + $(AS) $(ASFLAGS) $*.asm -SCHEME_SOURCES = $(TERMCAP_SOURCES) $(GRAPHICS_SOURCES) $(USER_PRIM_SOURCES) missing.c -SCHEME_OBJECTS = $(TERMCAP_OBJECTS) $(GRAPHICS_OBJECTS) $(USER_PRIM_OBJECTS) missing.obj -SCHEME_LIB = $(USER_LIBS) $(GRAPHICS_LIBS) $(TERMCAP_LIBS) -lm CORE_SOURCES = \ -$(MACHINE_SOURCES) \ artutl.c \ avltree.c \ bignum.c \ @@ -94,6 +75,8 @@ bigprm.c \ bitstr.c \ boot.c \ char.c \ +cmpauxmd.asm \ +cmpint.c \ comutl.c \ daemon.c \ debug.c \ @@ -130,11 +113,28 @@ string.c \ syntax.c \ sysprim.c \ term.c \ +tparam.c \ transact.c \ utils.c \ vector.c \ wind.c +#prbfish.c \ +#prgdbm.c \ +#prmd5.c \ +OS_PRIM_SOURCES = \ +prosfile.c \ +prosfs.c \ +prosio.c \ +prosproc.c \ +prosterm.c \ +prostty.c \ +prosenv.c \ +prntenv.c \ +prntfs.c \ +prntio.c \ +pruxsock.c + STD_GC_SOURCES = \ fasdump.c \ gcloop.c \ @@ -148,7 +148,7 @@ bchgcl.c \ bchmmg.c \ bchpur.c \ bchutl.c -# nt + NT_SOURCES = \ intext.c \ ntenv.c \ @@ -156,46 +156,23 @@ ntfile.c \ ntfs.c \ ntgui.c \ ntio.c \ +ntproc.c \ ntscreen.c \ ntsig.c \ +ntsock.c \ ntsys.c \ nttop.c \ nttrap.c \ +nttterm.c \ nttty.c \ ntasutl.asm -NT_OBJECTS = \ -intext.obj \ -ntenv.obj \ -ntfile.obj \ -ntfs.obj \ -ntgui.obj \ -ntio.obj \ -ntscreen.obj \ -ntsig.obj \ -ntsys.obj \ -nttop.obj \ -nttrap.obj \ -nttty.obj \ -ntasutl.obj \ -ntgui.rbj - -OS_PRIM_SOURCES = \ -prosfile.c \ -prosfs.c \ -prosio.c \ -prosterm.c \ -prostty.c \ -prosenv.c \ -prntenv.c \ -prntfs.c \ -prntio.c - HEAD_FILES = scheme.tch prims.h zones.h locks.h bignum.h \ $(GC_HEAD_FILES) trap.h lookup.h history.h cmpint.h +GC_HEAD_FILES = gccode.h cmpgc.h ntscmlib.h cmpintmd.h + CORE_OBJECTS = \ -$(MACHINE_OBJECTS) \ artutl.obj \ avltree.obj \ bignum.obj \ @@ -203,6 +180,8 @@ bigprm.obj \ bitstr.obj \ boot.obj \ char.obj \ +cmpauxmd.obj \ +cmpint.obj \ comutl.obj \ daemon.obj \ debug.obj \ @@ -239,21 +218,27 @@ string.obj \ syntax.obj \ sysprim.obj \ term.obj \ +tparam.obj \ transact.obj \ utils.obj \ vector.obj \ wind.obj +#prbfish.obj \ +#prgdbm.obj \ +#prmd5.obj \ OS_PRIM_OBJECTS = \ prosfile.obj \ prosfs.obj \ prosio.obj \ +prosproc.obj \ prosterm.obj \ prosenv.obj \ prostty.obj \ prntenv.obj \ prntfs.obj \ -prntio.obj +prntio.obj \ +pruxsock.obj STD_GC_OBJECTS = \ fasdump.obj \ @@ -269,11 +254,69 @@ bchmmg.obj \ bchpur.obj \ bchutl.obj +NT_OBJECTS = \ +intext.obj \ +ntenv.obj \ +ntfile.obj \ +ntfs.obj \ +ntgui.obj \ +ntio.obj \ +ntproc.obj \ +ntscreen.obj \ +ntsig.obj \ +ntsock.obj \ +ntsys.obj \ +nttop.obj \ +nttrap.obj \ +nttterm.obj \ +nttty.obj \ +ntasutl.obj + SOURCES = $(CORE_SOURCES) $(STD_GC_SOURCES) -OBJECTS = $(CORE_OBJECTS) $(STD_GC_OBJECTS) $(NT_OBJECTS) $(OS_PRIM_OBJECTS) usrdef.obj +OBJECTS = $(CORE_OBJECTS) $(STD_GC_OBJECTS) $(NT_OBJECTS) \ + $(OS_PRIM_OBJECTS) usrdef.obj BCHSOURCES = $(CORE_SOURCES) $(BCH_GC_SOURCES) -BCHOBJECTS = $(CORE_OBJECTS) $(BCH_GC_OBJECTS) $(NT_OBJECTS) $(OS_PRIM_OBJECTS) bchdef.obj +BCHOBJECTS = $(CORE_OBJECTS) $(BCH_GC_OBJECTS) $(NT_OBJECTS) \ + $(OS_PRIM_OBJECTS) bchdef.obj + +SCHEME_SOURCES = $(USER_PRIM_SOURCES) missing.c +SCHEME_OBJECTS = $(USER_PRIM_OBJECTS) missing.obj +SCHEME_LIB = $(USER_LIBS) # md5.lib blowfish.lib gdbm.lib + +scheme: scheme.exe + +scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) scheme32.obj + $(link) $(linkdebug) $(guiflags) -out:scheme.exe \ + $(OBJECTS) $(SCHEME_OBJECTS) scheme32.obj $(guilibsmt) $(SCHEME_LIB) + +bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) scheme32.obj + $(link) $(linkdebug) $(guiflags) -out:bchschem.exe \ + $(BCHOBJECTS) $(SCHEME_OBJECTS) scheme32.obj $(guilibsmt) $(SCHEME_LIB) + +scheme32.obj : scheme32.c ntscmlib.h + +bintopsb.exe : bintopsb.obj missing.obj + $(link) $(linkdebug) $(conflags) -out:bintopsb.exe \ + bintopsb.obj missing.obj $(conlibs) + +psbtobin.exe : psbtobin.obj missing.obj + $(link) $(linkdebug) $(conflags) -out:psbtobin.exe \ + psbtobin.obj missing.obj $(conlibs) + +findprim.exe : findprim.obj + $(link) $(linkdebug) $(conflags) -out:findprim.exe \ + findprim.obj $(conlibs) + +usrdef.c : $(SCHEME_SOURCES) $(SOURCES) $(OS_PRIM_SOURCES) ntgui.c usrdef.tch \ + findprim.exe + .\findprim $(SCHEME_SOURCES) $(SOURCES) $(OS_PRIM_SOURCES) ntgui.c \ + > usrdef.c + +bchdef.c : $(SCHEME_SOURCES) $(BCHSOURCES) $(OS_PRIM_SOURCES) ntgui.c \ + usrdef.tch findprim.exe + .\findprim $(SCHEME_SOURCES) $(BCHSOURCES) $(OS_PRIM_SOURCES) ntgui.c \ + > bchdef.c # Update the resource if necessary ntgui.rbj: ntgui.rc ntgui.h ntdialog.dlg ntdialog.h @@ -282,98 +325,42 @@ ntgui.rbj: ntgui.rc ntgui.h ntdialog.dlg ntdialog.h cvtres -$(CPU) $*.res -o $*.rbj !ENDIF -scheme: scheme.exe -scheme.exe : $(OBJECTS) $(SCHEME_OBJECTS) scm-cl3.lst -## $(link) $(linkdebug) $(sysflags) -out:scheme.exe @scm-cl3.lst $(syslibs) crtdll.lib - $(link) $(sysflags) -out:scheme.exe @scm-cl3.lst $(syslibs) crtdll.lib -bchschem.exe : $(BCHOBJECTS) $(SCHEME_OBJECTS) bch-cl3.lst -## $(link) $(linkdebug) $(sysflags) -out:bchschem.exe @bch-cl3.lst $(syslibs) crtdll.lib - $(link) $(sysflags) -out:bchschem.exe @bch-cl3.lst $(syslibs) crtdll.lib -findprim.exe : findprim.obj - $(link) $(linkdebug) $(conflags) -out:findprim.exe findprim.obj $(conlibs) -bintopsb.exe : bintopsb.obj missing.obj - $(link) $(linkdebug) $(conflags) -out:bintopsb.exe bintopsb.obj missing.obj $(conlibs) -psbtobin.exe : psbtobin.obj missing.obj - $(link) $(linkdebug) $(conflags) -out:psbtobin.exe psbtobin.obj missing.obj $(conlibs) -breakup.exe : breakup.obj - $(link) $(linkdebug) $(conflags) -out:breakup.exe breakup $(conlibs) -wsize.exe : wsize.obj - $(link) $(linkdebug) $(conflags) -out:wsize.exe wsize.obj $(conlibs) -ppband.exe : ppband.obj - $(link) $(linkdebug) $(conflags) -out:ppband.exe ppband.obj $(conlibs) - -usrdef.c : $(SCHEME_SOURCES) $(SOURCES) $(OS_PRIM_SOURCES) ntgui.c usrdef.tch findprim.exe scm-p-nt.lst - rm -f usrdef.c - .\findprim -o usrdef.c -l .\scm-p-nt.lst - -bchdef.c : $(SCHEME_SOURCES) $(BCHSOURCES) $(OS_PRIM_SOURCES) usrdef.tch findprim.exe bch-p-nt.lst - rm -f bchdef.c - .\findprim -o bchdef.c -l .\bch-p-nt.lst - -primitive_tables : - rm -f usrdef.c usrdef.obj bchdef.c bchdef.obj - -COMMON_OBJECTS = $(CORE_OBJECTS) $(STD_GC_OBJECTS) $(NT_OBJECTS) $(OS_PRIM_OBJECTS) -6003_SOURCES = $(X_SOURCES) $(TERMCAP_OBJECTS) $(GRAPHICS_SOURCES)\ - Sgraph_ar.c fft.c array.c\ - image.c -6003_OBJECTS = $(X_OBJECTS) $(TERMCAP_OBJECTS) $(GRAPHICS_OBJECTS)\ - Sgraph_ar.obj fft.obj array.obj\ - image.obj usr6003.obj -6003_LIB = $(USER_LIBS) $(GRAPHICS_LIBS) $(X_LIB) $(TERMCAP_LIBS)\ - -lm - scheme.tch : scheme.h oscond.h ansidecl.h dstack.h obstack.h config.h \ bkpt.h object.h scode.h sdata.h gc.h interp.h stack.h futures.h \ types.h errors.h returns.h const.h fixobj.h default.h extern.h \ prim.h intrpt.h critsec.h float.h outf.h - rm -f scheme.tch - touch scheme.tch + wtouch /q /r scheme.tch psbmap.tch : config.h object.h bignum.h bignmint.h bitstr.h types.h \ sdata.h const.h psbmap.h $(GC_HEAD_FILES) comlin.h comlin.c - rm -f psbmap.tch - touch psbmap.tch + wtouch /q /r psbmap.tch usrdef.tch : usrdef.h config.h object.h prim.h - rm -f usrdef.tch - touch usrdef.tch - -# Zortech MAKE seems not to allow redirection -# limits.h : hard-par.exe -# -./hard-par -l > limits.h - -# float.h : hard-par.exe -# -./hard-par -f > float.h - -hard-par.exe : hard-par.c - $(CC) hard-par.c $(MACHINE_SWITCHES) -DNO_SIG -DNO_SC $(LDFLAGS) + wtouch /q /r usrdef.tch foo $(USER_PRIM_OBJECTS) : $(HEAD_FILES) ### files compiled with optimization -interp.obj : scheme.tch locks.h trap.h lookup.h history.h cmpint.h zones.h prmcon.h - $(cc) $(cflags) $(cdebug) -Ox -c $*.c +interp.obj : scheme.tch locks.h trap.h lookup.h history.h cmpint.h zones.h \ + prmcon.h + ntscreen.obj : ntscreen.c ntgui.h ntscreen.h - $(cc) $(cflags) $(cdebug) -Ox -c $*.c + gcloop.obj : scheme.tch $(GC_HEAD_FILES) - $(cc) $(cflags) $(cdebug) -Ox -c $*.c -fasload.obj : - $(cc) $(cflags) $(cdebug) -Ox -c $*.c + +fasload.obj : scheme.tch prims.h osscheme.h osfile.h osio.h $(GC_HEAD_FILES) \ + trap.h option.h prmcon.h load.c fasl.h hooks.obj : scheme.tch prims.h winder.h history.h -utils.obj : scheme.tch prims.h winder.h history.h cmpint.h syscall.h -primutl.obj : scheme.tch os.h prims.h usrdef.h prename.h syscall.h \ +utils.obj : scheme.tch prims.h winder.h history.h cmpint.h syscall.h ntapi.h +primutl.obj : scheme.tch os.h prims.h usrdef.h prename.h syscall.h ntapi.h \ avltree.h $(GC_HEAD_FILES) -hunk.obj list.obj step.obj vector.obj sysprim.obj daemon.obj prim.obj extern.obj : \ - scheme.tch prims.h +hunk.obj list.obj step.obj vector.obj : scheme.tch prims.h +sysprim.obj daemon.obj prim.obj extern.obj : scheme.tch prims.h lookup.obj debug.obj intern.obj : scheme.tch prims.h lookup.h trap.h locks.h -fasload.obj : scheme.tch prims.h osscheme.h osfile.h osio.h $(GC_HEAD_FILES) \ - trap.h option.h prmcon.h load.c fasl.h fasdump.obj : scheme.tch prims.h osio.h osfile.h osfs.h $(GC_HEAD_FILES) \ trap.h lookup.h fasl.h dump.c memmag.obj : scheme.tch prims.h $(GC_HEAD_FILES) memmag.h -gcloop.obj : scheme.tch $(GC_HEAD_FILES) purify.obj : scheme.tch prims.h $(GC_HEAD_FILES) zones.h wabbit.obj : scheme.tch $(GC_HEAD_FILES) purutl.obj : scheme.tch prims.h $(GC_HEAD_FILES) zones.h @@ -392,112 +379,98 @@ option.obj : ansidecl.h option.h term.obj : scheme.tch missing.obj : config.h BCHGCC_H = bchgcc.h oscond.h $(GC_HEAD_FILES) -bchdmp.obj : scheme.tch prims.h ntio.h osio.h osfile.h trap.h lookup.h \ - $(BCHGCC_H) fasl.h dump.c -bchdrn.obj : ansidecl.h bchdrn.h -bchmmg.obj : scheme.tch prims.h nt.h $(BCHGCC_H) option.h bchdrn.h memmag.h -bchgcl.obj : scheme.tch $(BCHGCC_H) -bchpur.obj : scheme.tch prims.h $(BCHGCC_H) zones.h -bchutl.obj : ansidecl.h -syntax.obj : scheme.tch prims.h edwin.h syntax.h -bitstr.obj : scheme.tch prims.h bitstr.h -regex.obj : scheme.tch syntax.h regex.h -rgxprim.obj : scheme.tch prims.h edwin.h syntax.h regex.h -bintopsb.obj : psbmap.tch trap.h limits.h fasl.h load.c bltdef.h -psbtobin.obj : psbmap.tch float.h fasl.h dump.c -ppband.obj : ansidecl.h config.h errors.h types.h const.h object.h \ +bchdmp.obj : bchdmp.c scheme.tch prims.h ntio.h osio.h osfile.h trap.h \ + lookup.h $(BCHGCC_H) fasl.h dump.c +bchdrn.obj : bchdrn.c ansidecl.h bchdrn.h +bchmmg.obj : bchmmg.c scheme.tch prims.h nt.h $(BCHGCC_H) option.h bchdrn.h \ + memmag.h +bchgcl.obj : bchgcl.c scheme.tch $(BCHGCC_H) +bchpur.obj : bchpur.c scheme.tch prims.h $(BCHGCC_H) zones.h +bchutl.obj : bchutl.c ansidecl.h +syntax.obj : syntax.c scheme.tch prims.h edwin.h syntax.h +bitstr.obj : bitstr.c scheme.tch prims.h bitstr.h +regex.obj : regex.c scheme.tch syntax.h regex.h +rgxprim.obj : rgxprim.c scheme.tch prims.h edwin.h syntax.h regex.h +bintopsb.obj : bintopsb.c psbmap.tch trap.h limits.h fasl.h load.c bltdef.h +psbtobin.obj : psbtobin.c psbmap.tch float.h fasl.h dump.c +ppband.obj : ppband.c ansidecl.h config.h errors.h types.h const.h object.h \ $(GC_HEAD_FILES) sdata.h load.c fasl.h +outf.obj : outf.c scheme.tch ntscreen.h -fft.obj : scheme.tch prims.h zones.h array.h image.h +fft.obj : fft.c scheme.tch prims.h zones.h array.h image.h array.obj image.obj : scheme.tch prims.h array.h -cmpint.obj : scheme.tch prim.h $(GC_HEAD_FILES) -osscheme.obj : scheme.tch posixtyp.h os.h osscheme.h -ostty.obj : ansidecl.h oscond.h posixtyp.h os.h ostty.h osscheme.h +cmpint.obj : cmpint.c scheme.tch prim.h $(GC_HEAD_FILES) +osscheme.obj : osscheme.c scheme.tch posixtyp.h os.h osscheme.h +ostty.obj : ostty.c ansidecl.h oscond.h posixtyp.h os.h ostty.h osscheme.h error.obj ptrvec.obj transact.obj : ansidecl.h dstack.h outf.h -wind.obj : ansidecl.h dstack.h obstack.h -obstack.obj : obstack.h +wind.obj : wind.c ansidecl.h dstack.h obstack.h +obstack.obj : obstack.c obstack.h OS_PRIM_DEPENDENCIES = scheme.tch prims.h posixtyp.h os.h -prosenv.obj : osenv.h ostop.h $(OS_PRIM_DEPENDENCIES) -prosfile.obj : osfile.h $(OS_PRIM_DEPENDENCIES) -prosfs.obj : osfs.h $(OS_PRIM_DEPENDENCIES) -prosio.obj : osio.h $(OS_PRIM_DEPENDENCIES) -prosproc.obj : osproc.h $(OS_PRIM_DEPENDENCIES) -prosterm.obj : osterm.h osio.h $(OS_PRIM_DEPENDENCIES) -prostty.obj : ostty.h osctty.h ossig.h osfile.h osio.h $(OS_PRIM_DEPENDENCIES) -prmcon.obj : scheme.tch prims.h prmcon.h $(OS_PRIM_DEPENDENCIES) +prbfish.obj : prbfish.c $(OS_PRIM_DEPENDENCIES) +prgdbm.obj : prgdbm.c $(OS_PRIM_DEPENDENCIES) +prmd5.obj : prmd5.c $(OS_PRIM_DEPENDENCIES) +prosenv.obj : prosenv.c osenv.h ostop.h $(OS_PRIM_DEPENDENCIES) +prosfile.obj : prosfile.c osfile.h $(OS_PRIM_DEPENDENCIES) +prosfs.obj : prosfs.c osfs.h $(OS_PRIM_DEPENDENCIES) +prosio.obj : prosio.c osio.h $(OS_PRIM_DEPENDENCIES) +prosproc.obj : prosproc.c osproc.h $(OS_PRIM_DEPENDENCIES) +prosterm.obj : prosterm.c osterm.h osio.h $(OS_PRIM_DEPENDENCIES) +prostty.obj : prostty.c ostty.h osctty.h ossig.h osfile.h osio.h \ + $(OS_PRIM_DEPENDENCIES) +pruxsock.obj : $(OS_PRIM_DEPENDENCIES) +prmcon.obj : prmcon.c scheme.tch prims.h prmcon.h $(OS_PRIM_DEPENDENCIES) NT_DEPENDENCIES = oscond.h ansidecl.h posixtyp.h intext.h \ - dstack.h os.h osscheme.h nt.h ntsys.h syscall.h -ntenv.obj : scheme.tch osenv.h ntscreen.h $(NT_DEPENDENCIES) -ntfile.obj : osfile.h osio.h ntio.h $(NT_DEPENDENCIES) -ntfs.obj : osfs.h $(NT_DEPENDENCIES) -ntio.obj : osio.h ntio.h ntscmlib.h ntscreen.h $(NT_DEPENDENCIES) -nttop.obj : ostop.h nttop.h osctty.h errors.h option.h ntscmlib.h \ + dstack.h os.h osscheme.h nt.h ntapi.h ntsys.h syscall.h +ntenv.obj : ntenv.c scheme.tch osenv.h ntscreen.h $(NT_DEPENDENCIES) +ntfile.obj : ntfile.c osfile.h osio.h ntio.h $(NT_DEPENDENCIES) +ntfs.obj : ntfs.c ntfs.h osfs.h $(NT_DEPENDENCIES) +ntio.obj : ntio.c osio.h ntio.h ntscreen.h $(NT_DEPENDENCIES) +ntproc.obj : ntproc.c $(NT_DEPENDENCIES) osproc.h ntproc.h osio.h ntio.h \ + ntscreen.h ntgui.h +nttop.obj : nttop.c ostop.h nttop.h osctty.h errors.h option.h \ $(NT_DEPENDENCIES) -nttty.obj : ostty.h osenv.h osio.h ntio.h osterm.h ntterm.h $(NT_DEPENDENCIES) -ntsig.obj : ossig.h osctty.h ostty.h critsec.h \ +nttty.obj : nttty.c ostty.h osenv.h osio.h ntio.h osterm.h ntterm.h \ + ntscreen.h $(NT_DEPENDENCIES) +ntsig.obj : ntsig.c ossig.h osctty.h ostty.h critsec.h \ $(NT_DEPENDENCIES) ntgui.h ntio.h ntscmlib.h ntscreen.h -nttrap.obj: nttrap.h ntscmlib.h $(GC_HEAD_FILES) $(NT_DEPENDENCIES) -ntsys.obj: ntsys.h -ntgui.obj : ntgui.c ntdialog.h ntgui.h ntscmlib.h ntscreen.h $(NT_DEPENDENCIES) scheme.tch +ntsock.obj : ntsock.c ntio.h osio.h uxsock.h $(NT_DEPENDENCIES) +nttrap.obj: nttrap.c nttrap.h ntscmlib.h $(GC_HEAD_FILES) $(NT_DEPENDENCIES) +ntsys.obj: ntsys.c ntsys.h +ntgui.obj : ntgui.c ntdialog.h ntgui.h ntscreen.h $(NT_DEPENDENCIES) scheme.tch ntasutl.obj : ntasutl.asm -ntkbutl.obj : ntkbutl.asm -ntscreen.obj : ntscreen.c ntgui.h ntscreen.h -prntenv.obj : $(NT_DEPENDENCIES) -prntfs.obj : $(NT_DEPENDENCIES) scheme.tch prims.h osfs.h -prntio.obj : $(NT_DEPENDENCIES) scheme.tch prims.h ntio.h osio.h syscall.h +prntenv.obj : prntenv.c $(NT_DEPENDENCIES) +prntfs.obj : prntfs.c ntfs.h $(NT_DEPENDENCIES) scheme.tch prims.h osfs.h +prntio.obj : prntio.c $(NT_DEPENDENCIES) scheme.tch prims.h ntio.h osio.h \ + syscall.h ntscreen.h ntgui.h cmpauxmd.obj : cmpauxmd.asm - -scheme32.obj: scheme32.c ntscmlib.h makefile - -scheme32.exp: scheme32.obj scheme32.def - $(implib) -machine:$(CPU) -def:scheme32.def $*.obj -out:$*.lib - -scheme32.dll: scheme32.obj scheme32.exp - $(link) $(linkdebug) -dll -out:$*.dll \ - -entry:_CRT_INIT$(DLLENTRY) \ - $** $(syslibs) winmm.lib crtdll.lib - - -scheme31.obj: scheme31.c ntscmlib.h makefile - -scheme31.exp: scheme31.obj scheme31.def - $(implib) -machine:$(CPU) -def:scheme32.def $*.obj -out:$*.lib - -scheme31.dll: scheme31.obj scheme31.exp - $(link) $(linkdebug) -dll -out:$*.dll \ - -entry:ntw32lib_dllinit$(DLLENTRY) \ - $** $(syslibs) w32sut32.lib - clean: - del *.tch - del *.obj - del *.exe - del *.lib - del *.dll - del *.exp - del *.rbj - del *.res + -del *.tch + -del *.obj + -del *.exe + -del *.lib + -del *.dll + -del *.exp + -del *.rbj + -del *.res unconfig: - del cmpauxmd.asm - del cmpintmd.h - del limits.h - del float.h - del ntdialog.h - del ntw16lib.c - del ntw32lib.c - del makefile - del *.lst - del *.bat - del *.mak - del *.def - del *.dlg - del *.ico - del *.rc - del *.cur - - + -del cmpauxmd.asm + -del cmpintmd.h + -del limits.h + -del float.h + -del ntdialog.h + -del ntw16lib.c + -del ntw32lib.c + -del makefile + -del *.lst + -del *.bat + -del *.mak + -del *.def + -del *.dlg + -del *.ico + -del *.rc + -del *.cur diff --git a/v7/src/microcode/option.c b/v7/src/microcode/option.c index 8bf6d35ad..cd0d27283 100644 --- a/v7/src/microcode/option.c +++ b/v7/src/microcode/option.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: option.c,v 1.44 1997/10/22 05:21:25 cph Exp $ +$Id: option.c,v 1.45 1998/04/14 05:13:40 cph Exp $ -Copyright (c) 1990-97 Massachusetts Institute of Technology +Copyright (c) 1990-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -581,12 +581,12 @@ static void DEFUN (option_argument, (option, argument_p, value_cell), CONST char * option AND int argument_p AND - PTR value_cell) + CONST PTR value_cell) { struct option_descriptor descriptor; (descriptor . option) = option; (descriptor . argument_p) = argument_p; - (descriptor . value_cell) = value_cell; + (descriptor . value_cell) = ((PTR) value_cell); obstack_grow ((&scratch_obstack), (&descriptor), (sizeof (descriptor))); } diff --git a/v7/src/microcode/oscond.h b/v7/src/microcode/oscond.h index f804f3b87..8274eb709 100644 --- a/v7/src/microcode/oscond.h +++ b/v7/src/microcode/oscond.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: oscond.h,v 1.23 1997/05/01 01:21:20 cph Exp $ +$Id: oscond.h,v 1.24 1998/04/14 05:13:44 cph Exp $ -Copyright (c) 1990-97 Massachusetts Institute of Technology +Copyright (c) 1990-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -168,7 +168,7 @@ MIT in each case. */ #include "error: can't define both _BSD and _SYSV" #endif -#if (defined(_M_I386) || defined(M_I386)) && !defined(i386) +#if defined(_M_IX86) && !defined(i386) #define i386 #endif @@ -186,10 +186,14 @@ MIT in each case. */ #endif #endif -#if defined(__NT__) && !defined(WINNT) +#if (defined(_WIN32) || defined(__NT__)) && !defined(WINNT) #define WINNT #endif +#if defined(_MSC_VER) && !defined(CL386) +#define CL386 +#endif + #if defined(_BSD) || defined(_SYSV) || defined(_PIXEL) # define _UNIX #else diff --git a/v7/src/microcode/outf.c b/v7/src/microcode/outf.c index bdb0d025a..fc886e667 100644 --- a/v7/src/microcode/outf.c +++ b/v7/src/microcode/outf.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: outf.c,v 1.9 1995/10/24 05:09:21 cph Exp $ +$Id: outf.c,v 1.10 1998/04/14 05:13:48 cph Exp $ -Copyright (c) 1993-95 Massachusetts Institute of Technology +Copyright (c) 1993-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -54,7 +54,7 @@ MIT in each case. */ information to stay visible `after' the termination of Scheme. */ -#if defined(__STDC__) || defined(WINNT) || defined(__IBMC__) +#if defined(__STDC__) || defined(WINNT) || defined(__IBMC__) || defined(_MSC_VER) #include #define VA_START(args, lastarg) va_start(args, lastarg) #define VA_DCL diff --git a/v7/src/microcode/posixtyp.h b/v7/src/microcode/posixtyp.h index 7c974f475..142d34e85 100644 --- a/v7/src/microcode/posixtyp.h +++ b/v7/src/microcode/posixtyp.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: posixtyp.h,v 1.14 1997/10/22 05:22:06 cph Exp $ +$Id: posixtyp.h,v 1.15 1998/04/14 05:13:51 cph Exp $ -Copyright (c) 1990-97 Massachusetts Institute of Technology +Copyright (c) 1990-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -97,7 +97,7 @@ MIT in each case. */ #ifdef CL386 /*#define _MODE_T*/ #define _NLINK_T -#define _PID_T +/* #define _PID_T */ #define _CLOCK_T #define _TIME_T #define _SIZE_T diff --git a/v7/src/microcode/prntio.c b/v7/src/microcode/prntio.c index 3aa75be66..01cb808a3 100644 --- a/v7/src/microcode/prntio.c +++ b/v7/src/microcode/prntio.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: prntio.c,v 1.8 1997/10/24 07:24:34 cph Exp $ +$Id: prntio.c,v 1.9 1998/04/14 05:13:55 cph Exp $ -Copyright (c) 1993-97 Massachusetts Institute of Technology +Copyright (c) 1993-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -43,6 +43,7 @@ MIT in each case. */ #include "ntgui.h" #include "syscall.h" #include "ntproc.h" +#include "ostty.h" extern HANDLE master_tty_window; extern Tchannel EXFUN (arg_to_channel, (SCHEME_OBJECT, int)); @@ -171,7 +172,7 @@ wait_for_multiple_objects_1 (unsigned long n_channels, Tchannel * channels, { unsigned int index; for (index = 0; (index < n_channels); index += 1) - if ((index != console_index) + if ((index != ((unsigned long) console_index)) && ((NT_channel_n_read (channels[index])) != (-1))) return (index); } diff --git a/v7/src/microcode/utils.c b/v7/src/microcode/utils.c index 709774b54..245a4d06f 100644 --- a/v7/src/microcode/utils.c +++ b/v7/src/microcode/utils.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: utils.c,v 9.72 1997/06/26 06:58:07 cph Exp $ +$Id: utils.c,v 9.73 1998/04/14 05:13:58 cph Exp $ -Copyright (c) 1987-97 Massachusetts Institute of Technology +Copyright (c) 1987-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -1123,7 +1123,7 @@ DEFUN (C_call_scheme, (proc, nargs, argvec), cfp = C_Frame_Pointer; csp = C_Stack_Pointer; #ifdef NT386CL - try + __try #endif /* NT386CL */ #endif /* i386 */ { @@ -1166,7 +1166,7 @@ DEFUN (C_call_scheme, (proc, nargs, argvec), } #ifdef i386 #ifdef NT386CL - finally + __finally #endif /* NT386CL */ { C_Frame_Pointer = cfp; -- 2.25.1