/* -*-C-*-
-$Id: bchmmg.c,v 9.90 1995/10/09 05:51:50 cph Exp $
+$Id: bchmmg.c,v 9.91 1995/10/15 00:36:48 cph Exp $
Copyright (c) 1987-95 Massachusetts Institute of Technology
#include "os2.h"
#define SUB_DIRECTORY_DELIMITER '\\'
#define ASSUME_NORMAL_GC_FILE
-#if defined(__IBMC__) || defined(__EMX__)
+#if defined(__IBMC__) || defined(__WATCOMC__) || defined(__EMX__)
#include <io.h>
#include <sys\stat.h>
#endif
/* -*-C-*-
-$Id: bchutl.c,v 1.6 1995/10/09 05:52:46 cph Exp $
+$Id: bchutl.c,v 1.7 1995/10/15 00:37:09 cph Exp $
Copyright (c) 1991-95 Massachusetts Institute of Technology
#else /* not WINNT */
#ifdef _OS2
-#if defined(__IBMC__) || defined(__EMX__)
+#if defined(__IBMC__) || defined(__WATCOMC__) || defined(__EMX__)
#include <io.h>
#endif
/* -*-C-*-
-$Id: i386.h,v 1.27 1995/10/09 05:53:15 cph Exp $
+$Id: i386.h,v 1.28 1995/10/15 00:40:18 cph Exp $
Copyright (c) 1992-95 Massachusetts Institute of Technology
/* Hack for OS/2 calling-convention type: */
-#if defined(_OS2) && defined(__IBMC__)
+#if defined(_OS2) && (defined(__IBMC__) || defined(__WATCOMC__))
#define ASM_ENTRY_POINT(name) (_System name)
#else
#define ASM_ENTRY_POINT(name) name
/* -*-C-*-
-$Id: os2env.c,v 1.8 1995/10/09 05:54:02 cph Exp $
+$Id: os2env.c,v 1.9 1995/10/15 00:37:52 cph Exp $
Copyright (c) 1994-95 Massachusetts Institute of Technology
#include <sys\types.h>
#ifdef __IBMC__
-
#include <sys\timeb.h>
+#define NC_TIMEZONE _timezone
+#define NC_DAYLIGHT _daylight
+#define NC_FTIME _ftime
+#endif
-#else /* not __IBMC__ */
-#ifdef __GNUC__
+#if defined(__WATCOMC__) || defined(__EMX__)
+#include <sys\timeb.h>
+#define NC_TIMEZONE timezone
+#define NC_DAYLIGHT daylight
+#define NC_FTIME ftime
+#endif
+#ifdef __GCC2__
#include <errno.h>
#include <sys/times.h>
-#ifdef __EMX__
-#include <sys/timeb.h>
#endif
-#endif /* __GNUC__ */
-#endif /* not __IBMC__ */
-
static void initialize_real_time_clock (void);
static double get_real_time_clock (void);
}
}
-#ifdef __IBMC__
-
-long
-OS2_timezone (void)
-{
- return (_timezone);
-}
-
-int
-OS2_daylight_savings_p (void)
-{
- return (_daylight);
-}
-
-#else /* not __IBMC__ */
-#ifdef __EMX__
-
long
OS2_timezone (void)
{
- struct timeb tb;
- ftime (&tb);
- return (tb . timezone);
+#ifdef NC_TIMEZONE
+ return (NC_TIMEZONE);
+#endif
}
int
OS2_daylight_savings_p (void)
{
- struct timeb tb;
- ftime (&tb);
- return (tb . dstflag);
+#ifdef NC_DAYLIGHT
+ return (NC_DAYLIGHT);
+#endif
}
-#endif /* __EMX__ */
-#endif /* not __IBMC__ */
-
static double initial_rtc;
static void
static double
get_real_time_clock (void)
{
-#ifdef __IBMC__
+#ifdef NC_FTIME
struct timeb rtc;
- _ftime (&rtc);
+ NC_FTIME (&rtc);
return ((((double) (rtc . time)) * 1000.0) + ((double) (rtc . millitm)));
-#else /* not __IBMC__ */
-#ifdef __GNUC__
+#endif
+#ifdef __GCC2__
struct tms rtc;
times (&rtc);
return (((double) (rtc . tms_utime)) * (1000.0 / ((double) CLK_TCK)));
-#endif /* __GNUC__ */
-#endif /* not __IBMC__ */
+#endif
}
double
/* -*-C-*-
-$Id: os2thrd.c,v 1.4 1995/10/09 05:55:14 cph Exp $
+$Id: os2thrd.c,v 1.5 1995/10/15 00:38:48 cph Exp $
Copyright (c) 1994-95 Massachusetts Institute of Technology
#include "prims.h"
#include "errors.h"
+#ifdef __IBMC__
+#define HAVE_BEGINTHREAD
+#endif
+
+#ifdef __WATCOMC__
+#include <process.h>
+#define HAVE_BEGINTHREAD
+#endif
+
+#ifdef __EMX__
+#define HAVE_BEGINTHREAD
+#endif
+
extern void OS2_create_msg_queue (void);
extern ULONG APIENTRY OS2_subthread_exception_handler
(PEXCEPTIONREPORTRECORD, PEXCEPTIONREGISTRATIONRECORD, PCONTEXTRECORD,
= ((stack_size < 0x2000)
? 0x2000
: ((stack_size + 0xfff) & (~0xfff)));
-#if defined(__IBMC__) || defined(__EMX__)
+#ifdef HAVE_BEGINTHREAD
int result = (_beginthread (procedure, 0, ss, argument));
if (result < 0)
OS2_error_system_call (ERROR_MAX_THRDS_REACHED, syscall_beginthread);
return (result);
-#else /* not __IBMC__ nor __EMX__ */
+#else /* not HAVE_BEGINTHREAD */
TID tid;
STD_API_CALL (dos_create_thread,
((&tid), ((PFNTHREAD) procedure), ((ULONG) argument), 0, ss));
return (tid);
-#endif /* not __IBMC__ nor __EMX__ */
+#endif /* not HAVE_BEGINTHREAD */
}
void
OS2_endthread (void)
{
DosUnsetExceptionHandler (THREAD_EXCEPTION_HANDLER ());
-#if defined(__IBMC__) || defined(__EMX__)
+#ifdef HAVE_BEGINTHREAD
_endthread ();
#else
dos_exit (EXIT_THREAD, 0);
/* -*-C-*-
-$Id: os2top.c,v 1.15 1995/10/09 05:55:38 cph Exp $
+$Id: os2top.c,v 1.16 1995/10/15 00:39:03 cph Exp $
Copyright (c) 1994-95 Massachusetts Institute of Technology
{
}
-#ifdef __IBMC__
+#if defined(__IBMC__) || defined(__WATCOMC__)
void
bcopy (const char * from, char * to, unsigned int n)
{
rem
rem Copyright (c) 1994 Massachusetts Institute of Technology
rem
-rem $Id: config.cmd,v 1.2 1995/10/09 05:58:38 cph Exp $
+rem $Id: config.cmd,v 1.3 1995/10/15 00:42:09 cph Exp $
rem
copy cmpintmd\i386.h cmpintmd.h
copy cmpauxmd\i386.m4 cmpauxmd.m4
copy os2utl\makefile .
+copy cmpauxmd\asmcvt.c .
echo ***** Read and edit the makefile! *****
### -*- Fundamental -*-
###
-### $Id: makefile,v 1.11 1995/10/09 05:58:55 cph Exp $
+### $Id: makefile,v 1.12 1995/10/15 00:42:29 cph Exp $
###
### Copyright (c) 1994-95 Massachusetts Institute of Technology
###
# IBM C Set++/2 or IBM Visual Age C++:
include os2utl\makefile.vac
+# Watcom C/C++:
+#include os2utl\makefile.wcc
+
# EMX/GCC:
#include os2utl\makefile.emx
### -*- Fundamental -*-
###
-### $Id: makefile.cmn,v 1.1 1995/10/09 05:59:13 cph Exp $
+### $Id: makefile.cmn,v 1.2 1995/10/15 00:42:44 cph Exp $
###
### Copyright (c) 1994-95 Massachusetts Institute of Technology
###
$(OS_PRIM_OBJECTS) bchdef.$(OBJ)
clean:
- rm -f *.$(OBJ) *.exe *.tch usrdef.c bchdef.c
+ del *.$(OBJ) *.exe *.tch cmpauxmd.$(ASM) usrdef.c bchdef.c \
+ $(SYSTEM_CLEAN)
findprim.exe : findprim.$(OBJ)
+asmcvt.exe : asmcvt.$(OBJ)
bintopsb.exe : bintopsb.$(OBJ) missing.$(OBJ)
psbtobin.exe : psbtobin.$(OBJ) missing.$(OBJ)
breakup.exe : breakup.$(OBJ)
bchdef.c : $(SCHEME_SOURCES) $(BCHSOURCES) $(OS_PRIM_SOURCES) usrdef.tch \
findprim.exe
- .\findprim.exe $(SCHEME_SOURCES) $(BCHSOURCES) $(OS_PRIM_SOURCES) \
+ .\findprim $(SCHEME_SOURCES) $(BCHSOURCES) $(OS_PRIM_SOURCES) \
> bchdef.c
cmpauxmd.$(ASM) : cmpauxmd.m4
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 outf.h
- rm -f $@
- touch $@
+ echo touch > $@
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 $@
- touch $@
+ echo touch > $@
usrdef.tch : usrdef.h config.h object.h prim.h
- rm -f $@
- touch $@
+ echo touch > $@
foo $(USER_PRIM_OBJECTS) : $(HEAD_FILES)
### -*- Fundamental -*-
###
-### $Id: makefile.emx,v 1.1 1995/10/09 05:59:21 cph Exp $
+### $Id: makefile.emx,v 1.2 1995/10/15 00:43:03 cph Exp $
###
### Copyright (c) 1994-95 Massachusetts Institute of Technology
###
CFLAGS = $(GCCFLAGS) -DMIT_SCHEME -D__OS2__
LDFLAGS = $(GCCFLAGS)
SYSTEM_LIBS =
+SYSTEM_CLEAN =
M4 = m4
M4FLAGS = -DTYPE_CODE_LENGTH=6
AS = as
### -*- Fundamental -*-
###
-### $Id: makefile.gcc,v 1.1 1995/10/09 05:59:40 cph Exp $
+### $Id: makefile.gcc,v 1.2 1995/10/15 00:43:16 cph Exp $
###
### Copyright (c) 1995 Massachusetts Institute of Technology
###
CFLAGS = $(GCCFLAGS) -DMIT_SCHEME
LDFLAGS = $(GCCFLAGS)
SYSTEM_LIBS =
+SYSTEM_CLEAN =
M4 = m4
M4FLAGS = -DOS2
AS = as
### -*- Fundamental -*-
###
-### $Id: makefile.vac,v 1.1 1995/10/09 05:59:30 cph Exp $
+### $Id: makefile.vac,v 1.2 1995/10/15 00:43:40 cph Exp $
###
### Copyright (c) 1994-95 Massachusetts Institute of Technology
###
### without prior written consent from MIT in each case.
###
-#### Makefile for Scheme under OS/2 using EMX/GCC
+#### Makefile for Scheme under OS/2 using IBM Visual Age C++
\f
# This makefile is configured for use with GNU make, the IBM Visual
# Age C++ compiler (or IBM C Set++/2), GNU m4, and the GNU assembler
-# included with the GCC/2 package. Unfortunately, the output from the
-# GNU assembler requires two .lib files from GCC/2 as well; these
-# files are referenced here using absolute pathnames.
+# included with the EMX/GCC package.
# For optimization, replace /Ti+ with /O+, and delete /B"/DBGPACK".
# For C Set++/2, delete /B"/DBGPACK".
CFLAGS = $(ICCFLAGS) /DMIT_SCHEME
LDFLAGS = $(ICCFLAGS) /B"/EXEPACK:2" /B"/DBGPACK"
SCHEME_LDFLAGS = $(LDFLAGS)
-SYSTEM_LIBS = os2utl\libcrt.lib os2utl\gcc.lib
+SYSTEM_LIBS =
+SYSTEM_CLEAN =
M4 = m4
M4FLAGS = -DOS2
-AS = .\os2utl\as
-ASFLAGS = -I
+AS = as
+ASFLAGS = -Zomf
%.obj : %.c
$(CC) $(CFLAGS) /C $<
/* -*-C-*-
-$Id: oscond.h,v 1.19 1995/06/29 23:49:23 cph Exp $
+$Id: oscond.h,v 1.20 1995/10/15 00:39:20 cph Exp $
Copyright (c) 1990-95 Massachusetts Institute of Technology
#define _OS2
/* Don't really know the version but this is correct for my machine. */
#define _OS2_VERSION 211
-#ifdef _M_I386
+#if defined(_M_I386) || defined(M_I386)
#define _OS2386
#ifndef i386
#define i386
#endif /* i386 */
-#endif /* _M_I386 */
+#endif /* _M_I386 or M_I386 */
#endif /* __OS2__ */
#if defined(_BSD) || defined(_SYSV) || defined(_PIXEL)
/* -*-C-*-
-$Id: posixtyp.h,v 1.11 1994/11/28 04:30:16 cph Exp $
+$Id: posixtyp.h,v 1.12 1995/10/15 00:39:32 cph Exp $
Copyright (c) 1990-1994 Massachusetts Institute of Technology
#endif
#ifdef _OS2
-#ifdef __IBMC__
+#if defined(__IBMC__) || defined(__WATCOMC__)
#include <sys/types.h>
#include <time.h>
/* -*-C-*-
-$Id: prosproc.c,v 1.15 1995/10/09 05:56:18 cph Exp $
+$Id: prosproc.c,v 1.16 1995/10/15 00:39:51 cph Exp $
Copyright (c) 1990-95 Massachusetts Institute of Technology
return (result);
}
-#ifdef _OS2
-#ifndef __EMX__
+#if defined(_OS2) && defined(__IBMC__)
#define environ _environ
#endif
-#endif
DEFINE_PRIMITIVE ("SCHEME-ENVIRONMENT", Prim_scheme_environment, 0, 0, 0)
{