1 |
|
#include <varargs.h> |
2 |
|
#include <stdio.h> |
3 |
|
#include "att.h" |
4 |
|
|
5 |
|
FILE *fopen_binary(char *name,char *mode); |
6 |
|
|
7 |
#define MP386 |
#define MP386 |
8 |
#define WINDOWSNT |
#define WINDOWSNT |
9 |
#define MINGW |
#define MINGW |
10 |
#define GCL |
#define GCL |
11 |
|
|
12 |
/* #define filehdr _IMAGE_FILE_HEADER */ |
/* #define filehdr _IMAGE_FILE_HEADER */ |
13 |
|
/* #define RUN_PROCESS */ |
14 |
|
|
15 |
#define f_symptr PointerToSymbolTable |
#define f_symptr PointerToSymbolTable |
16 |
#define f_nsyms NumberOfSymbols |
#define f_nsyms NumberOfSymbols |
17 |
#define NO_PWD_H |
#define NO_PWD_H |
20 |
the native system page width */ |
the native system page width */ |
21 |
|
|
22 |
#define PAGEWIDTH 12 |
#define PAGEWIDTH 12 |
|
|
|
23 |
#define MAXPATHLEN 512 |
#define MAXPATHLEN 512 |
24 |
|
|
25 |
/* alter pathToAlter to fit in with the Clibrary of the system. |
/* alter pathToAlter to fit in with the Clibrary of the system. |
35 |
memory_save(buf,filename); \ |
memory_save(buf,filename); \ |
36 |
} while (0) |
} while (0) |
37 |
|
|
|
|
|
|
|
|
|
#include "att.h" |
|
|
/* #include "386.h" */ |
|
|
/* #include "fcntl.h" */ |
|
|
|
|
|
|
|
|
|
|
38 |
#define signals_pending *signalsPendingPtr |
#define signals_pending *signalsPendingPtr |
39 |
|
|
|
|
|
40 |
#undef DBEGIN |
#undef DBEGIN |
41 |
#define DBEGIN 0x10000000 |
#define DBEGIN _dbegin |
42 |
|
extern unsigned int _stacktop, _stackbottom, _dbegin; |
43 |
|
|
44 |
/* define if there is no _cleanup, do here what needs |
/* define if there is no _cleanup, do here what needs |
45 |
to be done before calling unexec |
to be done before calling unexec |
46 |
*/ |
*/ |
47 |
#define CLEANUP_CODE \ |
#define CLEANUP_CODE \ |
48 |
setbuf(stdin,0); \ |
setbuf(stdin,0); \ |
49 |
setbuf(stdout,0); |
setbuf(stdout,0); |
50 |
|
|
51 |
/* size to use for mallocs done */ |
/* size to use for mallocs done */ |
52 |
/* #define BABY_MALLOC_SIZE 0x5000 */ |
/* #define BABY_MALLOC_SIZE 0x5000 */ |
53 |
|
|
|
|
|
|
|
|
|
|
|
54 |
#define NO_SYS_PARAM_H |
#define NO_SYS_PARAM_H |
55 |
#define NO_SYS_TIMES_H |
#define NO_SYS_TIMES_H |
56 |
|
|
57 |
#ifdef IN_UNIXTIME |
#ifdef IN_UNIXTIME |
58 |
#undef ATT |
# undef ATT |
59 |
#undef BSD |
# undef BSD |
|
|
|
60 |
#endif |
#endif |
61 |
|
|
62 |
#undef NEED_GETWD |
#undef NEED_GETWD |
65 |
#define IS_DIR_SEPARATOR(x) ((x=='/')||(x=='\\')) |
#define IS_DIR_SEPARATOR(x) ((x=='/')||(x=='\\')) |
66 |
|
|
67 |
#ifdef IN_UNIXFSYS |
#ifdef IN_UNIXFSYS |
68 |
#undef ATT |
# undef ATT |
69 |
#define HAVE_RENAME |
# define HAVE_RENAME |
|
|
|
70 |
#endif |
#endif |
71 |
|
|
72 |
/* the result of 'getenv' is malloc'd */ |
/* the result of 'getenv' is malloc'd */ |
73 |
#define FREE_GETENV_RESULT |
#define FREE_GETENV_RESULT |
|
|
|
|
|
|
74 |
#define OUR_NSOCKET "winnsocket.c" |
#define OUR_NSOCKET "winnsocket.c" |
75 |
|
|
76 |
#define SIGBUS 7 |
#define SIGBUS 7 |
91 |
|
|
92 |
#define HAVE_SIGPROCMASK |
#define HAVE_SIGPROCMASK |
93 |
|
|
94 |
|
#if 0 |
95 |
#ifdef __MSVCRT__ |
#ifdef __MSVCRT__ |
96 |
typedef int sigset_t ; |
typedef int sigset_t ; |
97 |
#endif |
#endif |
98 |
|
#endif |
99 |
|
|
100 |
#define NEED_TO_REINSTALL_SIGNALS |
#define NEED_TO_REINSTALL_SIGNALS |
101 |
|
|
102 |
#ifndef SIGIO |
#ifndef SIGIO |
103 |
#define SIGIO 23 |
# define SIGIO 23 |
104 |
#endif |
#endif |
105 |
|
|
106 |
/* on most machines this will test in one instruction |
/* on most machines this will test in one instruction |
107 |
if the pointe/r is on the C stack or the 0 pointer |
if the pointe/r is on the C stack or the 0 pointer |
108 |
in winnt our heap starts at DBEGIN |
in winnt our heap starts at DBEGIN |
109 |
*/ |
*/ |
110 |
/* #define NULL_OR_ON_C_STACK(y)\ */ |
#define NULL_OR_ON_C_STACK(y) \ |
111 |
/* (((unsigned int)(y)) == 0 || \ */ |
(((unsigned int)(y)) == 0 || \ |
112 |
/* (((unsigned int)(y)) < DBEGIN && ((unsigned int)(y)) &0xf000000)) */ |
(((unsigned int)(y)) > _stacktop && ((unsigned int)(y)) < _stackbottom)) |
|
#define NULL_OR_ON_C_STACK(y) (((void *)(y)) < ((void *)0x400000)) |
|
|
|
|
113 |
|
|
114 |
#ifdef IN_FILE |
#ifdef IN_FILE |
115 |
#define HAVE_NSOCKET |
# define HAVE_NSOCKET |
116 |
#endif |
#endif |
117 |
|
|
|
|
|
|
|
|
118 |
/* #define HAVE_SIGACTION */ |
/* #define HAVE_SIGACTION */ |
119 |
/* a noop */ |
/* a noop */ |
120 |
#define SETUP_SIG_STACK |
#define SETUP_SIG_STACK |
121 |
#define SV_ONSTACK 0 |
#define SV_ONSTACK 0 |
122 |
#define SA_RESTART 0 |
#define SA_RESTART 0 |
123 |
|
|
|
|
|
|
|
|
|
|
|
124 |
#define brk(x) printf("not doing break\n"); |
#define brk(x) printf("not doing break\n"); |
|
#include <varargs.h> |
|
|
#include <stdio.h> |
|
|
FILE *fopen_binary(char *name,char *mode); |
|
|
|
|
125 |
|
|
126 |
#define USE_NT_UNEXEC |
#define USE_NT_UNEXEC |
|
#ifdef USE_NT_UNEXEC |
|
|
/* use the slightly older unexec */ |
|
|
#define UNIXSAVE "unexnt.c" |
|
|
#define RECREATE_HEAP if (initflag) { recreate_heap1(); \ |
|
|
terminal_io->sm.sm_object1->sm.sm_fp=stdout; \ |
|
|
terminal_io->sm.sm_object0->sm.sm_fp=stdin; } |
|
|
|
|
|
|
|
127 |
|
|
128 |
|
#ifdef USE_NT_UNEXEC |
129 |
|
/* use the slightly older unexec */ |
130 |
|
# define UNIXSAVE "unexnt.c" |
131 |
|
# define RECREATE_HEAP if (initflag) { recreate_heap1(); \ |
132 |
|
terminal_io->sm.sm_object1->sm.sm_fp=stdout; \ |
133 |
|
terminal_io->sm.sm_object0->sm.sm_fp=stdin; } |
134 |
#else |
#else |
135 |
#define UNIXSAVE "unexw32.c" |
# define UNIXSAVE "unexw32.c" |
136 |
#define RECREATE_HEAP init_heap(); |
# define RECREATE_HEAP init_heap(); |
137 |
#endif |
#endif |
138 |
|
|
|
|
|
139 |
#define SPECIAL_RSYM "rsym_nt.c" |
#define SPECIAL_RSYM "rsym_nt.c" |
140 |
|
#define RSYM_COMMAND(command,system_directory,kcl_self,tmpfile1) \ |
|
#define RSYM_COMMAND(command,system_directory,kcl_self,tmpfile1) \ |
|
141 |
sprintf(command,"rsym %s %s",kcl_self,tmpfile1); |
sprintf(command,"rsym %s %s",kcl_self,tmpfile1); |
142 |
|
|
143 |
|
|
144 |
#if defined(IN_SFASL) || defined(IN_RSYM) |
#if defined(IN_SFASL) || defined(IN_RSYM) |
145 |
#undef fopen |
# undef fopen |
146 |
FILE *fopen_binary(char *name,char *mode) |
FILE *fopen_binary(char *name,char *mode) |
147 |
{ |
{ |
148 |
char buf[10]; |
char buf[10]; |
154 |
return fopen(name,buf); |
return fopen(name,buf); |
155 |
} |
} |
156 |
#endif |
#endif |
157 |
|
|
158 |
#define fopen fopen_binary |
#define fopen fopen_binary |
159 |
|
|
160 |
#define HAVE_AOUT "wincoff.h" |
#define HAVE_AOUT "wincoff.h" |
178 |
} while (0) |
} while (0) |
179 |
|
|
180 |
#define FCLOSE_SETBUF_OK |
#define FCLOSE_SETBUF_OK |
|
|
|
|
|
|
181 |
#define IEEEFLOAT |
#define IEEEFLOAT |
|
|
|
182 |
#define I386 |
#define I386 |
|
|
|
183 |
#define ADDITIONAL_FEATURES \ |
#define ADDITIONAL_FEATURES \ |
184 |
ADD_FEATURE("I386"); ADD_FEATURE("WINNT"); ADD_FEATURE("BROKEN_O4_OPT"); ADD_FEATURE("MINGW32"); |
ADD_FEATURE("I386"); \ |
185 |
|
ADD_FEATURE("WINNT"); \ |
186 |
|
ADD_FEATURE("BROKEN_O4_OPT"); \ |
187 |
|
ADD_FEATURE("MINGW32"); |
188 |
|
|
189 |
#undef SET_REAL_MAXPAGE |
#undef SET_REAL_MAXPAGE |
190 |
#define SET_REAL_MAXPAGE \ |
#define SET_REAL_MAXPAGE \ |
191 |
init_shared_memory(); real_maxpage=MAXPAGE; |
init_shared_memory(); real_maxpage=MAXPAGE; |
192 |
|
|
|
|
|
|
|
|
|
|
|
193 |
/* include some low level routines for maxima */ |
/* include some low level routines for maxima */ |
194 |
#define CMAC |
#define CMAC |
195 |
|
|
198 |
/* FIONREAD not supported */ |
/* FIONREAD not supported */ |
199 |
#undef LISTEN_FOR_INPUT |
#undef LISTEN_FOR_INPUT |
200 |
|
|
|
|
|
|
|
|
201 |
/* adjust the start to the offset */ |
/* adjust the start to the offset */ |
202 |
#define ADJUST_RELOC_START(j) \ |
#define ADJUST_RELOC_START(j) \ |
203 |
the_start = memory->cfd.cfd_start + \ |
the_start = memory->cfd.cfd_start + \ |
204 |
(j == DATA_NSCN ? textsize : 0); |
(j == DATA_NSCN ? textsize : 0); |
205 |
|
|
|
|
|
206 |
#define IF_ALLOCATE_ERR \ |
#define IF_ALLOCATE_ERR \ |
207 |
if (core_end != sbrk(0))\ |
if (core_end != sbrk(0))\ |
208 |
{char * e = sbrk(0); \ |
{char * e = sbrk(0); \ |
217 |
error("Someone allocated my memory!");} \ |
error("Someone allocated my memory!");} \ |
218 |
if (core_end != (sbrk(PAGESIZE*(n - m)))) |
if (core_end != (sbrk(PAGESIZE*(n - m)))) |
219 |
|
|
|
/* allow things like //c at beginning of pathnames, and c:/ */ |
|
|
#define ALLOW_DRIVE_PATH |
|
|
|
|
|
|
|
220 |
#define USE_INTERNAL_REAL_TIME_FOR_RUNTIME |
#define USE_INTERNAL_REAL_TIME_FOR_RUNTIME |
221 |
|
#define SHARP_EQ_CONTEXT_SIZE 1024 |
|
#define SHARP_EQ_CONTEXT_SIZE 1024 |
|
222 |
|
|
223 |
/* Begin for cmpinclude */ |
/* Begin for cmpinclude */ |
224 |
|
|