|
|
1.1 root 1: #ifndef _COMPILER_DOT_H
2: #define _COMPILER_DOT_H
3:
4: /*
5: * COMPILER.H 5.20A June 8, 1995
6: *
7: * DESCRIPTION
8: *
9: * This is the header file used by library files to determine
10: * compiler/model dependent information. The compiler-dependent
11: * information has in the past been found in a file called GF.H,
12: * which also included a few macros, constants, and type definitions.
13: *
14: * Copyright (C) 1991-1995 Greenleaf Software Inc. All Rights Reserved.
15: *
16: * MODIFICATIONS
17: *
18: * December 12, 1992 : Released with CommLib 4.0
19: * December 1, 1994 5.10A : The usual changes associated with a new release.
20: * December 13, 1994 5.10A : Added patch 5.00D to this project.
21: * June 8, 1995 5.20A : Added NT support for Watcom and Symantec
22: * June 23, 1995 5.20A : Added support for the GF_CON32 macro. *All*
23: * of our BUILD INI files set this explicitly,
24: * but we pick up the definition a couple of
25: * other ways for users.
26: */
27:
28: #ifndef GF_BLANK
29: #define GF_BLANK
30: #endif
31:
32: #if defined(__TURBOC__) && !defined(__BORLANDC__)
33: #if ( __TURBOC__ > 0x201 )
34: #define GF_COMPILER_NAME "Turbo C++"
35: #define GF_TURBO_CPP
36: #define GF_COMPILER_VERSION __TURBOC__
37: #define GF_CDECL cdecl
38: #define GF_CONV GF_BLANK
39: #define ANSI_PROTOTYPES
40: #define GF_INTERRUPT interrupt
41: #define GF_UNUSED_PARAMETER( a ) (void) a
42: #define GF_FAR far
43: #ifdef __SMALL__
44: #endif
45: #ifdef __MEDIUM__
46: #define _LCODE 1
47: #endif
48: #ifdef __COMPACT__
49: #define _LDATA 1
50: #endif
51: #ifdef __LARGE__
52: #define _LCODE 1
53: #define _LDATA 1
54: #endif
55: #ifdef __HUGE__
56: #define _LCODE 1
57: #define _LDATA 2
58: #define _HUGE 1
59: #endif
60: #endif /* __TURBOC__ > 0x201 */
61: /* End of Turbo C++ */
62:
63: #elif defined(__TURBOC__) && defined(__BORLANDC__) /* Borland C++ */
64: #define GF_COMPILER_NAME "Borland C++"
65: #define GF_BORLAND_CPP
66: #define GF_COMPILER_VERSION __BORLANDC__
67: #if defined( __CONSOLE__ ) /* Borland turns this on with bcc32 -WC */
68: #define GF_CON32
69: #endif
70: #if defined( _Windows ) && !defined( __DPMI32__ ) && !defined( __DPMI16__ ) && !defined( DOSX386 )
71: #define GF_WINDOWS
72: #if defined( VGFD_DLL ) || defined( GF_DLL )
73: #if defined( __WIN32__ )
74: #define GF_CONV __stdcall
75: #define GF_CDECL _cdecl
76: #define GF_DLL_FAR
77: #else
78: #define GF_CONV _far pascal
79: #define GF_CDECL _far _cdecl
80: #define GF_DLL_FAR _far
81: #endif
82: #else
83: #define GF_CONV _cdecl
84: #define GF_CDECL _cdecl
85: #endif
86: #else
87: #if ( __BORLANDC__ >= 0x300 )
88: #if defined( GF_DLL ) && defined( __WIN32__ )
89: #define GF_CONV __stdcall
90: #else
91: #define GF_CONV _cdecl
92: #endif
93: #else
94: #define GF_CONV GF_BLANK
95: #endif
96: #define GF_CDECL _cdecl
97: #endif
98: #ifdef VGFD
99: #define GF_STANDARD
100: #endif
101: #define ANSI_PROTOTYPES
102: #define GF_INTERRUPT interrupt
103: #define GF_UNUSED_PARAMETER( a ) (void) a
104: #if defined( __WIN32__ )
105: #define GF_WIN32
106: #define GF_FAR
107: #else
108: #define GF_FAR _far
109: #endif
110: #ifdef __SMALL__
111: #endif
112: #ifdef __MEDIUM__
113: #define _LCODE 1
114: #endif
115: #ifdef __COMPACT__
116: #define _LDATA 1
117: #endif
118: #ifdef __LARGE__
119: #define _LCODE 1
120: #define _LDATA 1
121: #endif
122: #ifdef __HUGE__
123: #define _LCODE 1
124: #define _LDATA 2
125: #define _HUGE 1
126: #endif
127: /* End of Borland C++ */
128:
129: /* I think that just adding the loadds statement will make
130: all my ASM routines work properly with Watcom C */
131:
132: #elif defined(__WATCOMC__) && !defined(__386__)
133: #include <stddef.h>
134: #define GF_COMPILER_NAME "Watcom C"
135: #define GF_WATCOM_C
136: #define GF_COMPILER_VERSION 900
137: #define ANSI_PROTOTYPES
138: #define GF_INTERRUPT interrupt _cdecl
139: #define GF_UNUSED_PARAMETER( a ) (void) a
140: #define GF_FAR _far
141: #ifdef __WINDOWS__
142: #define GF_WINDOWS
143: #if defined( VGFD_DLL ) || defined( GF_DLL )
144: #define GF_DLL_FAR _far
145: #define GF_CONV _far pascal
146: #define GF_CDECL _far _cdecl
147: #else
148: #define GF_DLL_FAR
149: #define GF_CONV _cdecl
150: #define GF_CDECL _cdecl
151: #endif
152: #else /* Not windows */
153: #define GF_CDECL _cdecl __loadds
154: #define GF_CONV GF_BLANK
155: #endif
156: #ifdef M_I86SM
157: #endif
158: #ifdef M_I86MM
159: #define _LCODE 1
160: #endif
161: #ifdef M_I86CM
162: #define _LDATA 1
163: #endif
164: #ifdef M_I86LM
165: #define _LCODE 1
166: #define _LDATA 1
167: #endif
168: /* End of Watcom C */
169:
170: #elif defined(__WATCOMC__) && defined(__386__)
171: #include <stddef.h>
172: #define GF_COMPILER_NAME "Watcom C"
173: #define GF_WATCOM_C_386
174: #define GF_COMPILER_VERSION 950
175: #define GF_CDECL _cdecl
176: #define GF_CONV GF_BLANK
177: #define ANSI_PROTOTYPES
178: #define GF_INTERRUPT __interrupt
179: #define GF_UNUSED_PARAMETER( a ) (void) a
180: #if defined( __WINDOWS_386__ ) || defined( __NT__ )
181: #define GF_WINDOWS
182: #define GF_WIN32
183: #define GF_FAR
184: #else
185: #define GF_FAR far
186: #endif
187: #ifdef M_I86SM
188: #endif
189: #ifdef M_I86MM
190: #define _LCODE 1
191: #endif
192: #ifdef M_I86CM
193: #define _LDATA 1
194: #endif
195: #ifdef M_I86LM
196: #define _LCODE 1
197: #define _LDATA 1
198: #endif
199: /* End of Watcom C 386 */
200:
201: #elif defined( __SC__ ) /* Symantec C/C++ */
202: #define GF_COMPILER_NAME "Symantec C/C++"
203: #define GF_SYMANTEC_CPP
204: #define GF_COMPILER_VERSION __SC__
205: #define ANSI_PROTOTYPES
206: #define GF_INTERRUPT GF_BLANK
207: #define GF_UNUSED_PARAMETER( a ) (void) a
208: #if defined( __NT__ )
209: #define GF_WIN32
210: #define GF_FAR
211: #else
212: #define GF_FAR _far
213: #endif
214: #define INPUT( port ) inp( port )
215: #define OUTPUT( port, data ) outp( port, data )
216: #define CLI() int_off()
217: #define STI() int_on()
218: #ifdef _WINDOWS
219: #define GF_WINDOWS
220: #if (defined( VGFD_DLL ) || defined( GF_DLL )) && !defined( GF_WIN32 )
221: #define GF_DLL_FAR _far
222: #define GF_CONV _far pascal
223: #define GF_CDECL _far cdecl
224: #else
225: #define GF_CONV cdecl
226: #define GF_CDECL cdecl
227: #endif
228: #else
229: #define GF_CONV GF_BLANK
230: #define GF_CDECL cdecl
231: #endif
232: #ifdef VGFD
233: #define GF_STANDARD
234: #endif
235: #ifdef M_I86SM
236: #endif
237: #ifdef __MEDIUM__
238: #define _LCODE 1
239: #endif
240: #ifdef __COMPACT__
241: #define _LDATA 1
242: #endif
243: #ifdef __LARGE__
244: #define _LCODE 1
245: #define _LDATA 1
246: #endif
247: #ifdef _VCM__
248: #define _LCODE 1
249: #define _LDATA 1
250: #endif
251: /* End of Symantec C/C++ */
252:
253: #elif defined( __ZTC__ ) /* Zortech C/C++ */
254: #define GF_COMPILER_NAME "Zortech C/C++"
255: #define GF_ZORTECH_CPP
256: #define GF_COMPILER_VERSION __ZTC__
257: #define ANSI_PROTOTYPES
258: #define GF_INTERRUPT GF_BLANK
259: #define GF_UNUSED_PARAMETER( a ) (void) a
260: #define GF_FAR _far
261: #ifdef _WINDOWS
262: #define GF_WINDOWS
263: #if defined( VGFD_DLL ) || defined( GF_DLL )
264: #define GF_DLL_FAR _far
265: #define GF_CONV _far pascal
266: #define GF_CDECL _far cdecl
267: #else
268: #define GF_CONV cdecl
269: #define GF_CDECL cdecl
270: #endif
271: #else
272: #define GF_CONV GF_BLANK
273: #define GF_CDECL cdecl
274: #endif
275: #ifdef VGFD
276: #define GF_STANDARD
277: #endif
278: #ifdef M_I86SM
279: #endif
280: #ifdef M_I86MM
281: #define _LCODE 1
282: #endif
283: #ifdef M_I86CM
284: #define _LDATA 1
285: #endif
286: #ifdef M_I86LM
287: #define _LCODE 1
288: #define _LDATA 1
289: #endif
290: #ifdef M_I86VM
291: #define _LCODE 1
292: #define _LDATA 1
293: #endif
294: /* End of Zortech C/C++ */
295:
296: #elif defined( __TSC__ ) /* TopSpeed C */
297: #define GF_COMPILER_NAME "TopSpeed C"
298: #define GF_TOPSPEED_C
299: #define GF_COMPILER_VERSION __TSC__
300: #define GF_CDECL cdecl
301: #define GF_CONV GF_BLANK
302: #define ANSI_PROTOTYPES
303: #define GF_INTERRUPT interrupt
304: #define GF_UNUSED_PARAMETER( a ) if ( a != a ) a = 0
305: #define GF_FAR far
306: #if defined( M_I86SM )
307: #elif defined( M_I86MM )
308: #define _LCODE 1
309: #elif defined( M_I86CM )
310: #define _LDATA 1
311: #elif defined( M_I86LM )
312: #define _LCODE 1
313: #define _LDATA 1
314: #elif defined( M_I86MTM )
315: #define _LCODE 1
316: #define _LDATA 1
317: #elif defined( M_I86XM )
318: #define _LCODE 1
319: #define _LDATA 1
320: #define _HUGE 1
321: #else
322: #error Unsupported Topspeed memory model!
323: #endif
324: /* End of TopSpeed C/C++ */
325:
326: #elif defined(M_I86) && defined(MSDOS)
327: #define GF_COMPILER_NAME "Microsoft C"
328: #define GF_MICROSOFT_C
329: #if defined( _CONSOLE ) /* MSC 32 bit environment sets this for Console apps */
330: #define GF_CON32
331: #endif
332: /*
333: * MSC generates a warning message on GF_ASSERT when compiling in
334: * release mode. This turns it off.
335: *
336: * MSC 8.0 generates a warning message when it uses a precompiled header!
337: * I have to turn this off.
338: */
339: #if ( _MSC_VER >= 800 )
340: #pragma warning( disable : 4705 )
341: #pragma warning( disable : 4699 )
342: #endif
343: #if ( _MSC_VER >= 600 )
344: #define GF_COMPILER_VERSION _MSC_VER
345:
346: #ifdef _WINDOWS
347: #define GF_WINDOWS
348: #if defined( VGFD_DLL ) || defined( GF_DLL )
349: #define GF_DLL_FAR _far
350: #define GF_CONV _far pascal
351: #define GF_CDECL _far _cdecl
352: #else
353: #define GF_CONV _cdecl
354: #define GF_CDECL _cdecl
355: #endif
356: #else
357: #define GF_CONV _fastcall
358: #define GF_CDECL _cdecl
359: #endif
360: #ifdef VGFD
361: #define GF_STANDARD
362: #endif
363: #define ANSI_PROTOTYPES
364: #define GF_INTERRUPT interrupt far
365: #define GF_UNUSED_PARAMETER( a ) (a = a)
366: #define GF_FAR _far
367: #endif
368: #if defined( M_I86SM )
369: #elif defined( M_I86MM )
370: #define _LCODE 1
371: #elif defined( M_I86CM )
372: #define _LDATA 1
373: #elif defined( M_I86LM )
374: #define _LCODE 1
375: #define _LDATA 1
376: #else
377: #error Unsupported Microsoft C memory model!
378: #endif
379: #elif defined( _M_IX86 )
380: #define GF_COMPILER_NAME "Visual C++ 32-bit"
381: #define GF_VISUAL_CPP
382: #if ( _MSC_VER >= 800 )
383: #define GF_COMPILER_VERSION _MSC_VER
384: #ifdef _WINDOWS
385: #define GF_WINDOWS
386: #endif
387: #if defined( GF_DLL )
388: #define GF_DLL_FAR
389: #define GF_CONV
390: #define GF_CDECL _cdecl
391: #else
392: #define GF_CONV _fastcall
393: #define GF_CDECL _cdecl
394: #endif
395: #if defined( _WIN32 )
396: #define GF_WIN32
397: #if !defined( WIN32 )
398: #define WIN32
399: #endif
400: #endif
401: #define ANSI_PROTOTYPES
402: #define GF_INTERRUPT
403: #define GF_UNUSED_PARAMETER( a ) (a = a)
404: #define GF_FAR
405: #define _LCODE 0
406: #define _LDATA 0
407: #define _HUGE 0
408: #endif
409: #endif /* Microsoft C */
410:
411: #ifndef GF_COMPILER_NAME
412: #error This is an unknown compiler!
413: #endif
414: #ifndef GF_DLL_FAR
415: #define GF_DLL_FAR
416: #endif
417:
418: #endif /* #ifdef _COMPILER_DOT_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.