1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /********************************************************************20**
21 Name: environment dependent
25 Desc: Environment dependent defines required by the
26 by TRILLIUM software. The defines in this file need to
27 be changed by the customer to reflect the
28 processor family under which the TRILLIUM software
33 *********************************************************************21*/
41 /* envdep_h_001.main_70: Additions */
42 /* envdep_h_001.main_73: Not required for SUNOS */
47 #endif /* _GNU_SOURCE */
49 /*envdep_h_001.main_75 : RMIOS related changes*/
55 /* conversion of MSCDOS and MSCUNIX for backwards compatibility */
57 #ifdef MSCDOS /* microsoft, dos */
58 #define ANSI /* ansi */
60 #define MSC51 /* microsoft */
61 #else /* not microsoft, dos */
62 #ifdef MSCUNIX /* microsoft, unix */
63 #define ANSI /* ansi */
64 #define UNIX /* unix */
65 #define MSC51 /* microsoft */
66 #else /* not microsoft, dos or unix */
70 /* ensure microsoft 7.0 backwards compatible with microsoft 5.1 */
76 /* ensure microsoft 6.0 backwards compatible with microsoft 5.1 */
82 /* default to sunos 5.1 for sunos */
88 /* ensure sunos 4.1 backwards compatible with sunos */
96 /* ensure sunos 5.1 backwards compatible with sunos */
104 /* ensure elvis backwards compatible with sunos */
121 #endif /* POWER_STACK */
123 /* Fujitsu ALC evalutation board */
128 #endif /* ALC_EVAL */
130 /* argument manipulation for ansi or non ansi function prototypes */
132 #ifdef ANSI /* ansi */
138 /* type definition for ansi or non ansi pointers */
140 typedef void *Ptr; /* ANSI vanilla pointer type definition */
142 typedef char *Ptr; /* K&R vanilla pointer type definition */
146 /**********************************************************************
148 **********************************************************************/
151 these defines are arranged first by environment (DOS, UNIX, SUNOS or
152 embedded) followed by compiler (microsoft c, borland, unix or
153 microtec c) as appropriate.
155 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
156 #ifndef SS_4GMX_LCORE
157 /* envdep_h_001.main_76 Force definition of WIN32 when detecting WIN64 */
158 #if defined(_WIN32) || defined(_WIN64) /* dos, nt win32 */
165 #ifdef WIN32 /* dos, nt win32 */
166 #define INTERRPT /* interrupt */
167 #define ASM /* in-line assembly code */
168 #define ISR_PUSH_ENV /* isr push environment */
169 #define ISR_POP_ENV /* isr pop environment */
171 #define M_I86CM /* Intel 80x86 compact model */
173 #define BIOSKEY _bios_keybrd
174 #define BIOSTOD _bios_timeofday
175 #define DOSKEEP _dos_keep
176 #define DOSGETDATE _dos_getdate
177 #define DOSGETTIME _dos_gettime
178 #define DOSDATE dosdate_t
179 #define DOSTIME dostime_t
180 #define DOSSIZE size_t
181 #define DOSENABLE _enable
182 #define DOSDISABLE _disable
183 #define DOSGETVECT _dos_getvect
184 #define DOSSETVECT _dos_setvect
185 #define DOSINT86 int86
186 #define DOSINT86X int86x
187 #define DOSMALLOC malloc
188 #define DOSEXIT _exit
191 #define KEYBRD_READY _KEYBRD_READY
192 #define KEYBRD_READ _KEYBRD_READ
193 #define TIME_GETCLOCK _TIME_GETCLOCK
196 /*envdep_h_001.main_75 : RMIOS related changes*/
198 #define INTERRPT /* interrupt */
199 #define ASM /* in-line assembly code */
200 #define ISR_PUSH_ENV /* isr push environment */
201 #define ISR_POP_ENV /* isr pop environment */
204 #if (defined(VXWORKS_PENTIUM) || defined(VXWORKS_DIAB))
205 #define INTERRPT /* interrupt */
206 #define ASM /* in-line assembly code */
207 #define ISR_PUSH_ENV /* isr push environment */
208 #define ISR_POP_ENV /* isr pop environment */
210 #define M_I86CM /* Intel 80x86 compact model */
212 #define BIOSKEY _bios_keybrd
213 #define BIOSTOD _bios_timeofday
214 #define DOSKEEP _dos_keep
215 #define DOSGETDATE _dos_getdate
216 #define DOSGETTIME _dos_gettime
217 #define DOSDATE dosdate_t
218 #define DOSTIME dostime_t
219 #define DOSSIZE size_t
220 #define DOSENABLE _enable
221 #define DOSDISABLE _disable
222 #define DOSGETVECT _dos_getvect
223 #define DOSSETVECT _dos_setvect
224 #define DOSINT86 int86
225 #define DOSINT86X int86x
226 #define DOSMALLOC malloc
227 #define DOSEXIT _exit
230 #define KEYBRD_READY _KEYBRD_READY
231 #define KEYBRD_READ _KEYBRD_READ
232 #define TIME_GETCLOCK _TIME_GETCLOCK
233 #endif /* VXWORKS_PENTIUM */
237 #ifdef MSC51 /* dos, microsoft c */
238 #ifdef M_I86HM /* Intel 80x86 huge model */
239 #define INTERRPT _interrupt /* interrupt */
241 #define INTERRPT _interrupt far /* interrupt */
243 #define ASM /* in-line assembly code */
244 #define ISR_PUSH_ENV /* isr push environment */
245 #define ISR_POP_ENV /* isr pop environment */
246 #define BIOSKEY _bios_keybrd
247 #define BIOSTOD _bios_timeofday
248 #define DOSGETDATE _dos_getdate
249 #define DOSGETTIME _dos_gettime
250 #define DOSDATE dosdate_t
251 #define DOSTIME dostime_t
252 #define DOSENABLE _enable
253 #define DOSDISABLE _disable
254 #define DOSGETVECT _dos_getvect
255 #define DOSSETVECT _dos_setvect
256 #define DOSEXIT _exit
258 #define KEYBRD_READY _KEYBRD_READY
259 #define KEYBRD_READ _KEYBRD_READ
260 #define TIME_GETCLOCK _TIME_GETCLOCK
262 #ifdef M_I86SM /* Intel 80x86 small model */
266 #ifdef M_I86MM /* Intel 80x86 medium model */
270 #ifdef M_I86CM /* Intel 80x86 compact model */
274 #ifdef M_I86LM /* Intel 80x86 large model */
278 #ifdef M_I86HM /* Intel 80x86 huge model */
282 #ifdef BOR31 /* dos, borland c */
283 #define INTERRPT _interrupt far /* interrupt */
284 #define ASM /* in-line assembly code */
285 #define ISR_PUSH_ENV /* isr push environment */
286 #define ISR_POP_ENV /* isr pop environment */
288 #define I86LM /* Intel 80x86 large model */
290 #define BIOSKEY _bios_keybrd
291 #define BIOSTOD _bios_timeofday
292 #define DOSKEEP _dos_keep
293 #define DOSGETDATE _dos_getdate
294 #define DOSGETTIME _dos_gettime
295 #define DOSDATE dosdate_t
296 #define DOSTIME dostime_t
297 #define DOSSIZE size_t
298 #define DOSENABLE _enable
299 #define DOSDISABLE _disable
300 #define DOSGETVECT _dos_getvect
301 #define DOSSETVECT _dos_setvect
302 #define DOSINT86 int86
303 #define DOSINT86X int86x
304 #define DOSMALLOC malloc
305 #define DOSEXIT _exit
308 #define KEYBRD_READY _KEYBRD_READY
309 #define KEYBRD_READ _KEYBRD_READ
310 #define TIME_GETCLOCK _TIME_GETCLOCK
311 #else /* not BOR31 */
315 #ifdef UNIX /* unix */
316 #define INTERRPT /* interrupt */
317 #define ASM /* in-line assembly code */
318 #define ISR_PUSH_ENV /* isr push environment */
319 #define ISR_POP_ENV /* isr pop environment */
322 #ifdef __alpha /* alpha */
327 #ifdef SUNOS /* sun os */
328 #define PROC_SPARC /* sparc model */
329 #define UNIX /* unix */
331 #define INTERRPT /* interrupt */
332 #define ASM /* in-line assembly code */
333 #define ISR_PUSH_ENV /* isr push environment */
334 #define ISR_POP_ENV /* isr pop environment */
335 #else /* not SUNOS */
336 #ifdef HPOS /* HP os */
337 #define PROC_PARISC /* HP PA model */
338 #define UNIX /* unix */
340 #define INTERRPT /* interrupt */
341 #define ASM /* in-line assembly code */
342 #define ISR_PUSH_ENV /* isr push environment */
343 #define ISR_POP_ENV /* isr pop enviroment */
345 #ifdef MOTADS /* embedded, motorola ads */
346 #define PROC_68302 /* enable 68302 specific defines */
347 #define M68 /* motorola 68000 */
349 #ifdef DOSMRI42D /* DOS microtec c cross-compiler */
350 #define MRI68K /* microtec 68K c compiler */
351 #define INTERRPT interrupt /* interrupt */
352 #define ASM asm /* in-line assembly code */
353 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
354 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
355 #endif /* DOSMRI42D */
357 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
358 #define MRI68K /* microtec 68K c compiler */
359 #define INTERRPT interrupt /* interrupt */
360 #define ASM asm /* in-line assembly code */
361 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
362 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
363 #endif /* SOLMRI43 */
365 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
366 #define INTERRPT /* interrupt */
368 #define ASM __asm /* in-line assembly code */
370 #define ASM asm /* in-line assembly code */
372 #define ISR_PUSH_ENV /* isr push environment */
373 #define ISR_POP_ENV /* isr pop environment */
374 #endif /* SOLOAS186 */
376 #else /* not MOTADS */
377 #ifdef ELVIS /* elvis specific (not sun os) */
378 #define M68 /* motorola 68000 */
380 #ifdef DOSMRI42D /* DOS microtec c cross-compiler */
381 #define MRI68K /* microtec 68K c compiler */
382 #define INTERRPT interrupt /* interrupt */
383 #define ASM asm /* in-line assembly code */
384 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
385 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
386 #endif /* DOSMRI42D */
388 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
389 #define MRI68K /* microtec 68K c compiler */
390 #define INTERRPT interrupt /* interrupt */
391 #define ASM asm /* in-line assembly code */
392 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
393 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
394 #endif /* SOLMRI43 */
396 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
397 #define INTERRPT /* interrupt */
399 #define ASM __asm /* in-line assembly code */
401 #define ASM asm /* in-line assembly code */
403 #define ISR_PUSH_ENV /* isr push environment */
404 #define ISR_POP_ENV /* isr pop environment */
405 #endif /* SOLOAS186 */
407 #else /* not ELVIS */
409 #ifdef MSC51 /* embedded, microsoft c */
410 #ifdef M_I86HM /* Intel 80x86 huge model */
411 #define INTERRPT _interrupt /* interrupt */
412 #else /* not M_I86HM */
413 #define INTERRPT _interrupt far /* interrupt */
415 #define ASM /* in-line assembly code */
416 #define ISR_PUSH_ENV /* isr push environment */
417 #define ISR_POP_ENV /* isr pop environment */
418 #define BIOSKEY _bios_keybrd
419 #define BIOSTOD _bios_timeofday
420 #define DOSGETDATE _dos_getdate
421 #define DOSGETTIME _dos_gettime
422 #define DOSDATE dosdate_t
423 #define DOSTIME dostime_t
424 #define DOSENABLE _enable
425 #define DOSDISABLE _disable
426 #define DOSGETVECT _dos_getvect
427 #define DOSSETVECT _dos_setvect
428 #define DOSEXIT _exit
431 #define KEYBRD_READY _KEYBRD_READY
432 #define KEYBRD_READ _KEYBRD_READ
433 #define TIME_GETCLOCK _TIME_GETCLOCK
435 #ifdef M_I86SM /* Intel 80x86 small model */
439 #ifdef M_I86MM /* Intel 80x86 medium model */
443 #ifdef M_I86CM /* Intel 80x86 compact model */
447 #ifdef M_I86LM /* Intel 80x86 large model */
451 #ifdef M_I86HM /* Intel 80x86 huge model */
454 #else /* not MSC51 */
455 #ifdef BOR31 /* embedded, borland c */
456 #define INTERRPT /* interrupt */
457 #define ASM /* in-line assembly code */
458 #define ISR_PUSH_ENV /* isr push environment */
459 #define ISR_POP_ENV /* isr pop environment */
460 #define I86LM /* Intel 80x86 large model */
462 #define BIOSKEY _bios_keybrd
463 #define BIOSTOD _bios_timeofday
464 #define DOSKEEP _dos_keep
465 #define DOSGETDATE _dos_getdate
466 #define DOSGETTIME _dos_gettime
467 #define DOSDATE dosdate_t
468 #define DOSTIME dostime_t
469 #define DOSSIZE size_t
470 #define DOSENABLE _enable
471 #define DOSDISABLE _disable
472 #define DOSGETVECT _dos_getvect
473 #define DOSSETVECT _dos_setvect
474 #define DOSINT86 int86
475 #define DOSINT86X int86x
476 #define DOSMALLOC malloc
477 #define DOSEXIT _exit
480 #define KEYBRD_READY _KEYBRD_READY
481 #define KEYBRD_READ _KEYBRD_READ
482 #define TIME_GETCLOCK _TIME_GETCLOCK
483 #else /* not BOR31 */
484 #ifdef DOSMRI42D /* dos microtec c cross-compiler */
485 #define MRI68K /* microtec 68K c compiler */
486 #define INTERRPT interrupt /* interrupt */
487 #define ASM asm /* in-line assembly code */
488 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
489 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
491 #define M68 /* motorola 68000 */
493 #else /* DOSMRI42D */
494 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
495 #define MRI68K /* microtec 68K c compiler */
496 #define INTERRPT interrupt /* interrupt */
497 #define ASM asm /* in-line assembly code */
498 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
499 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
501 #define M68 /* motorola 68000 */
503 #else /* not SOLMRI43 */
504 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
505 #define INTERRPT /* interrupt */
507 #define ASM __asm /* in-line assembly code */
509 #define ASM asm /* in-line assembly code */
511 #define ISR_PUSH_ENV /* isr push environment */
512 #define ISR_POP_ENV /* isr pop environment */
513 #ifdef m68k /* motorola 68000 series */
514 #define M68 /* motorola 68000 */
516 #else /* not SOLOAS186 */
523 #define ASM __asm__ /* in-line assembly code */
524 #define ISR_PUSH_ENV /* isr push environment */
525 #define ISR_POP_ENV /* isr pop environment */
528 #define INTERRPT interrupt
529 #define ASM asm /* in-line assembly code */
530 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push env */
531 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop env */
533 #endif /* __GNUCC__ */
541 #define ASM __asm__ /* in-line assembly code */
542 #define ISR_PUSH_ENV /* isr push environment */
543 #define ISR_POP_ENV /* isr pop environment */
544 #else /* not gnu cc */
546 #define INTERRPT interrupt
547 #define ASM asm /* in-line assembly code */
548 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push env */
549 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop env */
551 #endif /* __GNUCC__ */
555 #define MRI68K /* microtec 68K c compiler */
556 #define INTERRPT interrupt /* interrupt */
557 #define ASM asm /* in-line assembly code */
558 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
559 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
561 #define M68 /* motorola 68000 */
563 #endif /* SOLMRI43 */
571 #define ASM __asm__ /* in-line assembly code */
572 #define ISR_PUSH_ENV /* isr push environment */
573 #define ISR_POP_ENV /* isr pop environment */
574 #else /* not gnu cc */
576 #define INTERRPT interrupt
577 #define ASM asm /* in-line assembly code */
578 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push env */
579 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop env */
581 #endif /* __GNUCC__ */
582 #else /* not GSIP302 */
589 #define ASM __asm__ /* in-line assembly code */
590 #define ISR_PUSH_ENV /* isr push environment */
591 #define ISR_POP_ENV /* isr pop environment */
594 #define INTERRPT interrupt
595 #define ASM asm /* in-line assembly code */
596 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push env */
597 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop env */
599 #endif /* __GNUCC__ */
600 #else /* not VB_360 */
601 #ifdef PQ_PPC860 /* Force PowerQUICC board */
602 #define PROC_PPC /* any PowerPC processor */
603 #define PROC_PPC860 /* MPC860 processor */
604 #ifdef __GNUC__ /* gnu C compiler */
606 #define ASM __asm__ /* in-line assembly code */
607 #define ISR_PUSH_ENV /* isr push environment */
608 #define ISR_POP_ENV /* isr pop environment */
610 #ifdef _MCCPPC /* micortech C compiler */
612 #define ASM asm /* in-line assembly code */
613 #define ISR_PUSH_ENV /* isr push env */
614 #define ISR_POP_ENV /* isr pop env */
616 #endif /* __GNUCC__ */
617 #else /* NOT PQ_PPC860 */
623 #define ASM __asm__ /* in-line assembly code */
624 #define ISR_PUSH_ENV /* isr push environment */
625 #define ISR_POP_ENV /* isr pop environment */
629 #define ASM asm /* in-line assembly code */
630 #define ISR_PUSH_ENV /* isr push env */
631 #define ISR_POP_ENV /* isr pop env */
633 #endif /* __GNUCC__ */
635 #ifdef SS_PS /* pSOS RTOS */
637 #define ASM __asm /* in-line assembly code */
638 #define ISR_PUSH_ENV /* isr push env */
639 #define ISR_POP_ENV /* isr pop env */
640 #else /* not SS_PS */
641 #define OTHMOD /* other model */
644 #endif /* PQ_PPC860 */
647 #endif /* ALC_EVAL */
648 #endif /* QUICCADS */
649 #endif /* MOTDCI_68360 */
650 #endif /* SOLOAS186 */
651 #endif /* SOLMRI43 */
652 #endif /* DOSMRI42D */
663 /**********************************************************************
665 **********************************************************************/
668 these typedefs are arranged first by environment (DOS, UNIX or
669 embedded) followed by compiler (microsoft c, borland c, unix or
670 microtec c) as appropriate.
674 #ifdef MSC51 /* dos, microsoft c */
676 typedef unsigned char Bool; /* boolean */
677 typedef char S8; /* signed - 8 bits */
679 typedef int S16; /* signed - 16 bits */
681 typedef long S32; /* signed - 32 bits */
682 /* envdep_h_001.main_71 */
683 typedef __int64 S64; /* signed - 64 bits */
688 note: if typedef Void is set to S16 then RETVOID must be set
689 to: return(ROK). if typedef Void is set to void then RETVOID
690 must be set to: return
693 /* envdep_h_001.main_78 Change typedef void to #define void*/
696 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
697 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
698 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
699 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
700 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
702 #else /* not MSC51 */
703 #ifdef BOR31 /* dos, borland c */
705 typedef unsigned char Bool; /* boolean */
706 typedef char S8; /* signed - 8 bits */
708 typedef int S16; /* signed - 16 bits */
710 typedef long S32; /* signed - 32 bits */
715 note: if typedef Void is set to S16 then RETVOID must be set
716 to: return(ROK). if typedef Void is set to void then RETVOID
717 must be set to: return
720 typedef void Void; /* void */
722 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
723 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
724 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
725 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
726 typedef Void (INTERRPT far *PIF) ARGS((void )); /* pointer to interrupt function */
728 #else /* not BOR31 */
732 #ifdef UNIX /* unix */
734 typedef unsigned char Bool; /* boolean */
735 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
736 #if !(defined(SS_4GMX_LCORE) || defined(SS_4GMX_UCORE))
737 typedef char S8; /* signed - 8 bits */
739 /*envdep_h_001.main_78 :removed signed to supress sprintf' differ in signedness warnings */
740 typedef char S8; /* signed - 8 bits*/
743 typedef short S16; /* signed - 16 bits */
745 #if !(defined(ALPHA) || defined(BIT_64))
746 typedef long S32; /* signed - 32 bits */
747 /* envdep_h_001.main_71 */
749 /* envdep_h_001.main_79 RVDT compiler warning fix */
750 #ifndef SS_4GMX_LCORE
751 /* envdep_h_001.main_72: Support for C89 standard */
752 __extension__ typedef long long S64; /* signed - 64 bits */
754 typedef long long S64; /* signed - 64 bits */
755 #define Void void /* RVDT compiler warning fix */
756 #endif /* SS_4GMX_LCORE */
758 typedef long long S64; /* signed - 64 bits */
759 #endif /* SS_LINUX */
760 #else /* ALPHA & BIT_64 */
761 typedef int S32; /* signed - 32 bits */
762 /* envdep_h_001.main_71 */
763 typedef long S64; /* signed - 64 bits */
764 #endif /* ALPHA & BIT_64 */
765 /* 1. Added F32 and F64 */
767 typedef float F32; /* float - 32 bits */
768 typedef double F64; /* double - 64 bits */
769 #endif /* SS_FLOAT */
774 note: if typedef Void is set to S16 then RETVOID must be set
775 to: return(ROK). if typedef Void is set to void then RETVOID
776 must be set to: return
782 /* envdep_h_001.main_79 RVDT compiler warning fix */
783 #ifndef SS_4GMX_LCORE
784 typedef void Void; /* void */
788 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
789 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
790 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
791 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning VOID */
792 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
795 #ifdef PROC_68302 /* embedded, motorola ads */
796 #ifdef DOSMRI42D /* dos microtec c cross-compiler */
798 typedef unsigned char Bool; /* boolean */
799 typedef char S8; /* signed - 8 bits */
801 typedef short S16; /* signed - 16 bits */
803 typedef int S32; /* signed - 32 bits */
806 /* size_t is not defined, for some odd reason, in mcc68k's stddef.h */
807 typedef unsigned size_t; /* size_t */
808 #endif /* not ANSI */
813 note: if typedef Void is set to S16 then RETVOID must be set
814 to: return(ROK). if typedef Void is set to void then RETVOID
815 must be set to: return
818 typedef void Void; /* void */
819 typedef Void VOID; /* void */
821 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
822 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
823 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
824 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
825 typedef Void (*PIF) ARGS((void )); /* pointer to interrupt function */
827 #else /* not DOSMRI42D */
828 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
830 typedef unsigned char Bool; /* boolean */
831 typedef char S8; /* signed - 8 bits */
833 typedef short S16; /* signed - 16 bits */
835 typedef int S32; /* signed - 32 bits */
840 note: if typedef Void is set to S16 then RETVOID must be set
841 to: return(ROK). if typedef Void is set to void then RETVOID
842 must be set to: return
845 typedef void Void; /* void */
846 typedef Void VOID; /* void */
848 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
849 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
850 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
851 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
852 typedef Void (*PIF) ARGS((void )); /* pointer to interrupt function */
854 #else /* not SOLMRI43 */
855 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
857 typedef unsigned char Bool; /* boolean */
858 typedef char S8; /* signed - 8 bits */
860 typedef short S16; /* signed - 16 bits */
862 typedef int S32; /* signed - 32 bits */
867 note: if typedef Void is set to S16 then RETVOID must be set
868 to: return(ROK). if typedef Void is set to void then RETVOID
869 must be set to: return
872 typedef void Void; /* void */
873 typedef Void VOID; /* void */
875 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
876 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
877 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
878 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
879 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
881 #else /* not SOLOAS186 */
882 #ifdef __GNUC__ /* if GNUC cross compiler */
884 typedef unsigned char Bool; /* boolean */
885 typedef char S8; /* signed - 8 bits */
887 typedef short S16; /* signed - 16 bits */
889 typedef int S32; /* signed - 32 bits */
890 /* envdep_h_001.main_71 */
891 typedef long long S64; /* signed - 64 bits */
892 /* 1. Added F32 and F64 types */
894 typedef float F32; /* float - 32 bits */
895 typedef double F64; /* double - 64 bits */
896 #endif /* SS_FLOAT */
901 note: if typedef Void is set to S16 then RETVOID must be set
902 to: return(ROK). if typedef Void is set to void then RETVOID
903 must be set to: return
906 typedef void Void; /* void */
907 typedef Void VOID; /* void */
909 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
910 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
911 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
912 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
913 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
915 #else /* not __GNUC__ */
917 #endif /* SOLOAS186 */
918 #endif /* SOLMRI43 */
919 #endif /* DOSMRI42D */
920 #else /* not PROC_68302 */
923 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
924 typedef unsigned char Bool; /* boolean */
925 typedef char S8; /* signed - 8 bits */
927 typedef short S16; /* signed - 16 bits */
929 typedef int S32; /* signed - 32 bits */
934 note: if typedef Void is set to S16 then RETVOID must be set
935 to: return(ROK). if typedef Void is set to void then RETVOID
936 must be set to: return
939 typedef void Void; /* void */
940 typedef Void VOID; /* void */
942 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
943 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
944 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
945 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
946 typedef INTERRPT Void (*PIF) ARGS((void)); /* pointer to interrupt function */
947 #endif /* SOLMRI43 */
948 #else /* not PROC_68040 */
951 typedef unsigned char Bool; /* boolean */
952 typedef char S8; /* signed - 8 bits */
954 typedef short S16; /* signed - 16 bits */
956 typedef long S32; /* signed - 32 bits */
961 note: if typedef Void is set to S16 then RETVOID must be set
962 to: return(ROK). if typedef Void is set to void then RETVOID
963 must be set to: return
966 typedef void Void; /* void */
968 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
969 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
970 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
971 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
972 typedef INTERRPT Void (*PIF) ARGS((void )); /* pointer to interrupt function */
974 #else /* not PROC_68360 */
977 typedef unsigned char Bool; /* boolean */
978 typedef char S8; /* signed - 8 bits */
980 typedef short S16; /* signed - 16 bits */
982 typedef int S32; /* signed - 32 bits */
983 /* envdep_h_001.main_76 Take care of the windows compiler non compliance
984 * to ANSI-C for data type ranges
986 typedef long long S64; /* signed - 64 bits */
988 /* 1. Added F32 and F64 types */
990 typedef float F32; /* float - 32 bits */
991 typedef double F64; /* double - 64 bits */
992 #endif /* SS_FLOAT */
996 note: if typedef Void is set to S16 then RETVOID must be set
997 to: return(ROK). if typedef Void is set to void then RETVOID
998 must be set to: return
1001 typedef void Void; /* void */
1003 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1004 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1005 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1006 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1007 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
1009 #else /* not WIN32 */
1011 typedef unsigned char Bool; /* boolean */
1012 typedef char S8; /* signed - 8 bits */
1014 typedef short S16; /* signed - 16 bits */
1016 typedef long S32; /* signed - 32 bits */
1021 note: if typedef Void is set to S16 then RETVOID must be set
1022 to: return(ROK). if typedef Void is set to void then RETVOID
1023 must be set to: return
1026 typedef void Void; /* void */
1028 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1029 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1030 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1031 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1032 typedef INTERRPT Void (*PIF) ARGS((void )); /* pointer to interrupt function */
1034 #else /* not PROC_68349 */
1037 typedef unsigned char Bool; /* boolean */
1038 typedef char S8; /* signed - 8 bits */
1040 typedef short S16; /* signed - 16 bits */
1042 typedef long S32; /* signed - 32 bits */
1044 /* envdep_h_001.main_74 - additions */
1045 typedef long long S64; /* signed - 64 bits */
1047 typedef int S32; /* signed - 32 bits */
1048 typedef long S64; /* signed - 64 bits */
1051 /* 1. Added F32 and F64 types */
1053 typedef float F32; /* float - 32 bits */
1054 typedef double F64; /* double - 64 bits */
1055 #endif /* SS_FLOAT */
1059 note: if typedef Void is set to S16 then RETVOID must be set
1060 to: return(ROK). if typedef Void is set to void then RETVOID
1061 must be set to: return
1064 typedef void Void; /* void */
1066 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1067 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1068 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1069 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1070 typedef INTERRPT Void (*PIF) ARGS((void )); /* pointer to interrupt function */
1072 #else /* not PROC_PPC */
1075 typedef unsigned char Bool; /* boolean */
1076 typedef char S8; /* signed - 8 bits */
1078 typedef short S16; /* signed - 16 bits */
1081 typedef long S32; /* signed - 32 bits */
1083 /* envdep_h_001.main_71 - additions */
1084 typedef int64_t S64; /* signed - 64 bits */
1086 typedef int S32; /* signed - 32 bits */
1087 typedef long S64; /* signed - 64 bits */
1093 note: if typedef Void is set to S16 then RETVOID must be set
1094 to: return(ROK). if typedef Void is set to void then RETVOID
1095 must be set to: return
1098 typedef void Void; /* void */
1100 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1101 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1102 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1103 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1104 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
1106 #else /* not SS_PS */
1108 typedef unsigned char Bool; /* boolean */
1109 typedef char S8; /* signed - 8 bits */
1111 typedef int S16; /* signed - 16 bits */
1113 typedef long S32; /* signed - 32 bits */
1118 note: if typedef Void is set to S16 then RETVOID must be set
1119 to: return(ROK). if typedef Void is set to void then RETVOID
1120 must be set to: return
1123 typedef void Void; /* void */
1125 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1126 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1127 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1128 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1129 typedef INTERRPT Void (*PIF) ARGS((void )); /* pointer to interrupt function */
1132 #endif /* PROC_PPC */
1133 #endif /* PROC_68349 */
1135 #endif /* PROC_68360 */
1136 #endif /* PROC_68040 */
1137 #endif /* PROC_68302 */
1142 /* scope control keywords */
1146 #define PUBLIC /* public is c default scope */
1147 #else /* not PUBLIC */
1153 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
1154 /*envdep_h_001.main_78 : removed SSI-4GMX specfic changes*/
1158 /**********************************************************************
1159 prototypes for sprintf
1160 **********************************************************************/
1162 /*envdep_h_001.main_75 : RMIOS related changes*/
1167 S8 *sprintf ARGS((S8 *buffer, const S8 *format, /* args */ ...));
1170 #else /* not SUNOS51 */
1172 int sprintf ARGS((S8 *s, const S8 *format, /* args */ ... ));
1175 Void sprintf ARGS((S8 *outbuf, S8 *fmt, /* args */ ...)); /* td68k.x */
1179 int sprintf ARGS((S8 *buffer,const S8 *format, /* args */ ...));
1182 int sprintf ARGS((S8 *buffer,const S8 *format, /* args */ ...));
1185 int sprintf ARGS((S8 *buffer,const S8 *format, /* args */ ...));
1189 #endif /* _MCC68K */
1191 #endif /* SUNOS51 */
1192 #endif /* SUNOS41 */
1193 #endif /* STDIO_INCLD */
1197 /**********************************************************************
1198 defines for pointers, pointer sizes, stack alignment and registers
1199 **********************************************************************/
1202 defines are provided for: intel 80x86 small, intel 80x86 medium,
1203 intel 80x86 compact, intel 80x86 large, intel huge, motorola 68000,
1204 sparc, vax and other processors.
1207 #ifdef I86SM /* Intel 80x86 small model */
1209 #define NULLP 0 /* null pointer */
1210 #define NULLD 0L /* null data */
1211 #define PTR uint16_t /* pointer */
1212 #define PTRSIZE sizeof(uint16_t) /* pointer size */
1213 #define STKALIGN 2 /* stack alignment */
1215 #define REG1 register /* register 1 - highest priority */
1216 #define REG2 register /* register 2 */
1217 #define REG3 /* register 3 */
1218 #define REG4 /* register 4 */
1219 #define REG5 /* register 5 */
1220 #define REG6 /* register 6 */
1221 #define REG7 /* register 7 */
1222 #define REG8 /* register 8 - lowest priority */
1224 #define FAR /* for small model */
1225 #define PTRSTRIDE 1 /* stride */
1226 #define MEM_SEG /* memory - segmented */
1229 #ifdef I86MM /* Intel 80x86 medium model */
1231 #define NULLP 0 /* null pointer */
1232 #define NULLD 0L /* null data */
1233 #define PTR uint16_t /* pointer */
1234 #define PTRSIZE sizeof(uint16_t) /* pointer size */
1235 #define STKALIGN 2 /* stack alignment */
1237 #define REG1 register /* register 1 - highest priority */
1238 #define REG2 register /* register 2 */
1239 #define REG3 /* register 3 */
1240 #define REG4 /* register 4 */
1241 #define REG5 /* register 5 */
1242 #define REG6 /* register 6 */
1243 #define REG7 /* register 7 */
1244 #define REG8 /* register 8 - lowest priority */
1246 #define FAR /* for medium model */
1247 #define PTRSTRIDE 1 /* stride */
1248 #define MEM_SEG /* memory - segmented */
1251 #ifdef I86CM /* Intel 80x86 compact model */
1253 #define NULLP 0L /* null pointer */
1254 #define NULLD 0L /* null data */
1256 #define PTR uint32_t /* pointer */
1257 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1258 /* #define PTRFAR pointer far */
1259 #define STKALIGN 4 /* stack alignment */
1261 #define PTR uint64_t /* pointer */
1262 /* envdep_h_001.main_78:Warning fix*/
1263 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1264 /* #define PTRFAR pointer far */
1265 #define STKALIGN 8 /* stack alignment */
1269 #define REG1 register /* register 1 - highest priority */
1270 #define REG2 register /* register 2 */
1271 #define REG3 /* register 3 */
1272 #define REG4 /* register 4 */
1273 #define REG5 /* register 5 */
1274 #define REG6 /* register 6 */
1275 #define REG7 /* register 7 */
1276 #define REG8 /* register 8 - lowest priority */
1278 #define FAR far /* for compact model */
1279 #define PTRSTRIDE 1 /* stride */
1280 #define MEM_SEG /* memory - segmented */
1284 #ifdef I86LM /* Intel 80x86 large model */
1286 #define NULLP 0L /* null pointer */
1287 #define NULLD 0L /* null data */
1289 #define PTR uint32_t /* pointer */
1290 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1291 #define PTRFAR /* pointer far */
1292 #define STKALIGN 4 /* stack alignment */
1294 #define PTR uint64_t /* pointer */
1295 /* envdep_h_001.main_78:Warning fix*/
1296 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1297 /* #define PTRFAR pointer far */
1298 #define STKALIGN 8 /* stack alignment */
1301 #define REG1 register /* register 1 - highest priority */
1302 #define REG2 register /* register 2 */
1303 #define REG3 /* register 3 */
1304 #define REG4 /* register 4 */
1305 #define REG5 /* register 5 */
1306 #define REG6 /* register 6 */
1307 #define REG7 /* register 7 */
1308 #define REG8 /* register 8 - lowest priority */
1310 #define FAR far /* for large model */
1311 #define PTRSTRIDE 1 /* stride */
1312 #define MEM_SEG /* memory - segmented */
1315 #ifdef I86HM /* Intel 80x86 huge model */
1317 #define NULLP 0L /* null pointer */
1318 #define NULLD 0L /* null data */
1320 #define PTR uint32_t /* pointer */
1321 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1322 #define PTRFAR /* pointer far */
1323 #define STKALIGN 4 /* stack alignment */
1325 #define PTR uint64_t /* pointer */
1326 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1327 #define PTRFAR /* pointer far */
1328 #define STKALIGN 8 /* stack alignment */
1331 #define REG1 register /* register 1 - highest priority */
1332 #define REG2 register /* register 2 */
1333 #define REG3 /* register 3 */
1334 #define REG4 /* register 4 */
1335 #define REG5 /* register 5 */
1336 #define REG6 /* register 6 */
1337 #define REG7 /* register 7 */
1338 #define REG8 /* register 8 - lowest priority */
1340 #define FAR far /* for huge model */
1341 #define PTRSTRIDE 1 /* stride */
1342 #define MEM_SEG /* memory - segmented */
1345 #ifdef PROC_68XXX /* Motorola 68040 model */
1347 #define NULLP 0L /* null pointer */
1348 #define NULLD 0L /* null data */
1349 #define PTR uint32_t /* pointer */
1350 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1351 /* #define PTRFAR pointer far */
1352 #define STKALIGN 4 /* stack alignment */
1354 #define REG1 register /* register 1 - highest priority */
1355 #define REG2 register /* register 2 */
1356 #define REG3 register /* register 3 */
1357 #define REG4 register /* register 4 */
1358 #define REG5 register /* register 5 */
1359 #define REG6 register /* register 6 */
1360 #define REG7 register /* register 7 */
1361 #define REG8 register /* register 8 - lowest priority */
1363 #define FAR /* for large model */
1366 #define PTRSTRIDE 2 /* stride (simulation case: e.g. for elvis) */
1369 #define PTRSTRIDE 4 /* stride (simulation case: e.g. for elvis) */
1371 #define PTRSTRIDE 4 /* stride (simulation case: e.g. for elvis) */
1372 #endif /* PROC_68040 */
1373 #endif /* PROC_68302 */
1375 #define MEM_NONSEG /* memory - non-segmented */
1376 #endif /* PROC_68XXX */
1379 #ifdef PROC_SPARC /* SPARC */
1381 #define NULLP 0L /* null pointer */
1382 #define NULLD 0L /* null data */
1384 #define PTR uint32_t /* pointer */
1385 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1386 /* #define PTRFAR pointer far */
1387 #define STKALIGN 4 /* stack alignment */
1389 #define PTR uint64_t /* pointer */
1390 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1391 /* #define PTRFAR pointer far */
1392 #define STKALIGN 8 /* stack alignment */
1395 #define REG1 register /* register 1 - highest priority */
1396 #define REG2 register /* register 2 */
1397 #define REG3 register /* register 3 */
1398 #define REG4 register /* register 4 */
1399 #define REG5 register /* register 5 */
1400 #define REG6 register /* register 6 */
1401 #define REG7 register /* register 7 */
1402 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
1403 #ifndef SS_4GMX_LCORE
1404 #define REG8 register /* register 8 - lowest priority */
1407 #define FAR /* for large model */
1408 #define PTRSTRIDE 4 /* stride */
1409 #define MEM_NONSEG /* memory - non-segmented */
1410 #endif /* PROC_SPARC */
1411 #ifdef PROC_PARISC /* HP PA RISC */
1413 #define NULLP 0L /* null pointer */
1414 #define NULLD 0L /* null data */
1416 #define PTR uint32_t /* pointer */
1417 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1418 /* #define PTRFAR pointer far */
1419 #define STKALIGN 4 /* stack alignment */
1421 #define PTR uint64_t /* pointer */
1422 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1423 /* #define PTRFAR pointer far */
1424 #define STKALIGN 8 /* stack alignment */
1427 #define REG1 register /* register 1 - highest priority */
1428 #define REG2 register /* register 2 */
1429 #define REG3 register /* register 3 */
1430 #define REG4 register /* register 4 */
1431 #define REG5 register /* register 5 */
1432 #define REG6 register /* register 6 */
1433 #define REG7 register /* register 7 */
1434 #define REG8 register /* register 8 - lowest priority */
1436 #define FAR /* for large model */
1437 #define PTRSTRIDE 4 /* stride */
1438 #define MEM_NONSEG /* memory - non-segmented */
1439 #endif /* PROC_PARISC */
1441 /*envdep_h_001.main_75 : RMIOS related changes*/
1443 #define SPtr2l(ptr) ((unsigned long)(ptr))
1444 #define SPtr2ll(ptr) ((unsigned long long)(unsigned long)(ptr))
1445 #define SL2Ptr(l) ((PTR)(l))
1446 #define SLL2Ptr(ll) ((PTR)(ll & 0xFFFFFFFF))
1448 #define NULLP 0L /* null pointer */
1449 #define NULLD 0L /* null data */
1451 #define PTR uint32_t /* pointer */
1452 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1453 #define STKALIGN 4 /* stack alignment */
1455 #define PTR uint64_t /* pointer */
1456 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1457 #define STKALIGN 8 /* stack alignment */
1460 #define REG1 register /* register 1 - highest priority */
1461 #define REG2 register /* register 2 */
1462 #define REG3 register /* register 3 */
1463 #define REG4 register /* register 4 */
1464 #define REG5 register /* register 5 */
1465 #define REG6 register /* register 6 */
1466 #define REG7 register /* register 7 */
1467 #define REG8 register /* register 8 - lowest priority */
1470 #ifdef VAX /* VAX */
1472 #define NULLP 0L /* null pointer */
1473 #define NULLD 0L /* null data */
1474 #define PTR uint32_t /* pointer */
1475 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1476 /* #define PTRFAR pointer far */
1477 #define STKALIGN 4 /* stack alignment */
1479 #define REG1 register /* register 1 - highest priority */
1480 #define REG2 register /* register 2 */
1481 #define REG3 register /* register 3 */
1482 #define REG4 register /* register 4 */
1483 #define REG5 register /* register 5 */
1484 #define REG6 register /* register 6 */
1485 #define REG7 register /* register 7 */
1486 #define REG8 register /* register 8 - lowest priority */
1488 #define FAR /* for large model */
1489 #define PTRSTRIDE 2 /* stride */
1490 #define MEM_NONSEG /* memory - non-segmented */
1494 #ifdef ALPHA /* ALPHA */
1496 #define NULLP 0L /* null pointer */
1497 #define NULLD 0L /* null data */
1498 #define PTR uint64_t /* pointer */
1499 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1500 /* #define PTRFAR pointer far */
1501 #define STKALIGN 8 /* stack alignment */
1503 #define REG1 register /* register 1 - highest priority */
1504 #define REG2 register /* register 2 */
1505 #define REG3 register /* register 3 */
1506 #define REG4 register /* register 4 */
1507 #define REG5 register /* register 5 */
1508 #define REG6 register /* register 6 */
1509 #define REG7 register /* register 7 */
1510 #define REG8 register /* register 8 - lowest priority */
1512 #define FAR /* for large model */
1513 #define PTRSTRIDE 2 /* stride */
1514 #define MEM_NONSEG /* memory - non-segmented */
1517 #ifdef PROC_68360 /* Motorola 68040 model */
1519 #define NULLP 0L /* null pointer */
1520 #define NULLD 0L /* null data */
1521 #define PTR uint32_t /* pointer */
1522 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1523 /* #define PTRFAR pointer far */
1524 #define STKALIGN 4 /* stack alignment */
1526 #define REG1 register /* register 1 - highest priority */
1527 #define REG2 register /* register 2 */
1528 #define REG3 register /* register 3 */
1529 #define REG4 register /* register 4 */
1530 #define REG5 register /* register 5 */
1531 #define REG6 register /* register 6 */
1532 #define REG7 register /* register 7 */
1533 #define REG8 register /* register 8 - lowest priority */
1535 #define FAR /* for large model */
1537 #define PTRSTRIDE 4 /* stride (simulation case: e.g. for elvis) */
1538 #define MEM_NONSEG /* memory - non-segmented */
1539 #endif /* PROC_68360 */
1542 #ifdef PROC_PPC /* SPARC */
1544 #define NULLP 0L /* null pointer */
1545 #define NULLD 0L /* null data */
1547 #define PTR uint32_t /* pointer */
1548 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1549 /* #define PTRFAR pointer far */
1550 #define STKALIGN 4 /* stack alignment */
1552 #define PTR uint64_t /* pointer */
1553 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1554 /* #define PTRFAR pointer far */
1555 #define STKALIGN 8 /* stack alignment */
1558 #define REG1 register /* register 1 - highest priority */
1559 #define REG2 register /* register 2 */
1560 #define REG3 register /* register 3 */
1561 #define REG4 register /* register 4 */
1562 #define REG5 register /* register 5 */
1563 #define REG6 register /* register 6 */
1564 #define REG7 register /* register 7 */
1565 #define REG8 register /* register 8 - lowest priority */
1567 #define FAR /* for large model */
1568 #define PTRSTRIDE 4 /* stride */
1569 #define MEM_NONSEG /* memory - non-segmented */
1570 #endif /* PROC_PPC */
1573 #ifdef SS_PS /* 32-bit pSOS */
1574 #define NULLP 0L /* null pointer */
1575 #define NULLD 0L /* null data */
1577 #define PTR uint32_t /* pointer */
1578 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1579 #define STKALIGN 4 /* stack alignment */
1581 #define PTR uint64_t /* pointer */
1582 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1583 #define STKALIGN 8 /* stack alignment */
1587 #define REG1 register /* register 1 - highest priority */
1588 #define REG2 register /* register 2 */
1589 #define REG3 register /* register 3 */
1590 #define REG4 register /* register 4 */
1591 #define REG5 register /* register 5 */
1592 #define REG6 register /* register 6 */
1593 #define REG7 register /* register 7 */
1594 #define REG8 register /* register 8 - lowest priority */
1596 #define FAR /* for large model */
1597 #define PTRSTRIDE 4 /* stride */
1601 #ifdef OTHMOD /* All other models */
1603 #define NULLP 0L /* null pointer */
1604 #define NULLD 0L /* null data */
1605 /* envdep_h_001.main_76 WIN32 and WIN64 falls here, so be sure PTR is correctly defined
1606 * when compiling 64bits
1608 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
1609 #ifndef SS_4GMX_LCORE
1611 #define PTR uint64_t /* pointer */
1612 #define PTRSIZE sizeof(uint64_t) /* pointer size */
1613 #define STKALIGN 8 /* stack alignment */
1615 #define PTR uint32_t /* pointer */
1616 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1617 #define STKALIGN 4 /* stack alignment */
1620 #define PTR uint32_t /* pointer */
1621 #define PTRSIZE sizeof(uint32_t) /* pointer size */
1622 #define STKALIGN 4 /* stack alignment */
1625 #define REG1 register /* register 1 - highest priority */
1626 #define REG2 register /* register 2 */
1627 #define REG3 register /* register 3 */
1628 #define REG4 register /* register 4 */
1629 #define REG5 register /* register 5 */
1630 #define REG6 register /* register 6 */
1631 #define REG7 register /* register 7 */
1632 #define REG8 register /* register 8 - lowest priority */
1634 #define FAR /* for large model */
1635 #define PTRSTRIDE 2 /* stride */
1636 #define MEM_NONSEG /* memory - non-segmented */
1640 /* pointer alignment macro */
1642 #define PTRALIGN(s) ((PTR)(s) % PTRSTRIDE ? ((PTR)(s) + (PTRSTRIDE - ((PTR)(s) % PTRSTRIDE))) : (PTR)(s))
1644 * This macro (DATAALIGN) should only be used in our
1645 * static memory algorithms (SGetSBuf).
1647 * Otherwise, use at your own risk!
1649 #define DATAALIGN(s) ((Size)(s) % PTRSTRIDE ? ((Size)(s) - (PTRSTRIDE - ((Size)(s) % PTRSTRIDE))) : (Size)(s))
1652 /* message function type macro */
1656 /* typedef and defines for argument manipulation */
1658 typedef S8 *ARGTYPE;
1660 #define ARG(argp,type) *((type*)argp)
1662 #define ARGINC(argp,type) argp=(ARGTYPE)(argp + (sizeof(type) < STKALIGN ? STKALIGN : sizeof(type)))
1664 /* Unused function parameter macro */
1668 #define UNUSED(x) (x=x)
1670 #define UNUSED(x) (x=x)
1674 /**********************************************************************
1676 **********************************************************************/
1680 there is one additional trace macro which turns on trace macros 0 - 4
1681 and pushes the text within trace macros 0 - 4 onto a stack. the text
1682 is popped of of the stack upon RETVOID or RETVALUE. this macro is:
1684 TRACE5 - trace call stack
1688 #ifdef TRACE5 /* trace 5 - call stack */
1690 #define T5M 64 /* trace 5 - maximum call stack height */
1691 S8 *t5s[]; /* trace 5 - call stack */
1692 S16 t5t; /* trace 5 - top of call stack */
1699 /**********************************************************************
1701 **********************************************************************/
1704 these returns are arranged first by environment (DOS, UNIX or
1705 embedded) followed by compiler (microsoft c, borland c, unix or
1706 microtec c) as appropriate.
1709 #ifdef DOS /* dos */
1710 #ifdef MSC51 /* dos, microsoft c */
1712 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
1713 /* envdep_h_001.main_76: Removed void type casting */
1714 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
1716 #define RETVOID return /* void */
1717 #define RETVALUE(v) return(v) /* return value */
1719 #else /* not microsoft c */
1720 #ifdef BOR31 /* dos, borland c */
1722 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
1723 /* envdep_h_001.main_76: Removed void type casting */
1724 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
1726 #define RETVOID return /* void */
1727 #define RETVALUE(v) return(v) /* return value */
1729 #else /* not borland c */
1733 #ifdef UNIX /* unix */
1735 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
1736 /* envdep_h_001.main_76: Removed void type casting */
1737 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
1740 #define RETVOID return /* void */
1741 #define RETVALUE(v) return(v) /* return value */
1743 #else /* not unix */
1744 #ifdef MOTADS /* embedded, motorola ads */
1745 #ifdef DOSMRI42D /* dos microtec c cross-compiler */
1747 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
1748 /* envdep_h_001.main_76: Removed void type casting */
1749 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
1751 #define RETVOID return /* void */
1752 #define RETVALUE(v) return(v) /* return value */
1754 #else /* not dos microtec c */
1755 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
1757 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
1758 /* envdep_h_001.main_76: Removed void type casting */
1759 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
1761 #define RETVOID return /* void */
1762 #define RETVALUE(v) return(v) /* return value */
1764 #else /* not solaris microtec c cross-compiler */
1765 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
1767 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
1768 /* envdep_h_001.main_76: Removed void type casting */
1769 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
1771 #define RETVOID return /* void */
1772 #define RETVALUE(v) return(v) /* return value */
1774 #else /* not microtec c, not oasys c */
1778 #else /* not motorola ads */
1780 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
1781 /* envdep_h_001.main_76: Removed void type casting */
1782 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
1784 #define RETVOID return /* void */
1785 #define RETVALUE(v) return(v) /* return value */
1787 #endif /* motorola ads */
1792 /* General Macros - Moved from envind.h */
1796 #define MIN(x, y) ((x) > (y) ? (y) : (x)) /* get minimum value */
1798 #define MIN(x, y) ((x) > (y) ? (y) : (x)) /* get minimum value */
1803 #define MAX(x, y) ((x) > (y) ? (x) : (y)) /* get maximum value */
1805 #define MAX(x, y) ((x) > (y) ? (x) : (y)) /* get maximum value */
1813 The following defines are used as switches throughout the
1816 PORTVER Portable version
1819 LCINT Loosely coupled - isdn network layer
1820 TCINT Tightly coupled - isdn network layer
1821 LCXNT Loosely coupled - x.25 network layer
1822 TCXNT Tightly coupled - x.25 network layer
1823 LCDAT Loosely coupled - data link layer
1824 TCDAT Tightly coupled - data link layer
1825 LCMAC Loosely coupled - mac layer
1826 TCMAC Tightly coupled - mac layer
1827 LCLM Loosely coupled - layer management
1828 TCLM Tightly coupled - layer management
1833 UNIX unix environment
1835 MSC51 microsoft c 5.1 compiler
1836 MSC60 microsoft c 6.0 compiler
1837 MSC70 microsoft c 7.0 compiler
1838 DOSMRI42D dos microtec c 4.2D cross-compiler
1839 SOLMRI43 solaris microtec c 4.3 cross-compiler
1840 SOLOAS186 solaris oasys 1.8.6 cross-compiler
1841 BOR31 borland c 3.1 compiler
1843 SUNOS sun os environment
1844 SUNOS41 sun os 4.1 environment and compiler
1845 SUNOS51 sun os 5.1 environment and compiler
1847 MSCDOS microsoft c, DOS environment - being phased out
1848 MSCUNIX microsoft c, UNIX environment - being phased out
1850 UC2 Franklin UC2A interface
1851 WT3 Retix WT-330 interface
1852 FUT Dassault AT-FUT interface
1853 MDP Dassault MOS/Driver interface
1857 TRC0 Trace 0 - MOS support functions
1858 TRC1 Trace 1 - MOS interface functions
1859 TRC2 Trace 2 - layer support functions
1860 TRC3 Trace 3 - layer interface functions
1861 TRC4 Trace 4 - interrupt service functions
1863 X28X29 X.28 and X.29 support
1867 #ifdef TENB_TTI_PERF
1868 #define TTI_THRESHOLD_VALUE 800
1876 #endif /* __ENVDEPH__ */
1879 /********************************************************************30**
1882 **********************************************************************/