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*/
42 /* envdep_h_001.main_70: Additions */
43 /* envdep_h_001.main_73: Not required for SUNOS */
48 #endif /* _GNU_SOURCE */
50 /*envdep_h_001.main_75 : RMIOS related changes*/
56 /* conversion of MSCDOS and MSCUNIX for backwards compatibility */
58 #ifdef MSCDOS /* microsoft, dos */
59 #define ANSI /* ansi */
61 #define MSC51 /* microsoft */
62 #else /* not microsoft, dos */
63 #ifdef MSCUNIX /* microsoft, unix */
64 #define ANSI /* ansi */
65 #define UNIX /* unix */
66 #define MSC51 /* microsoft */
67 #else /* not microsoft, dos or unix */
71 /* ensure microsoft 7.0 backwards compatible with microsoft 5.1 */
77 /* ensure microsoft 6.0 backwards compatible with microsoft 5.1 */
83 /* default to sunos 5.1 for sunos */
89 /* ensure sunos 4.1 backwards compatible with sunos */
97 /* ensure sunos 5.1 backwards compatible with sunos */
105 /* ensure elvis backwards compatible with sunos */
122 #endif /* POWER_STACK */
124 /* Fujitsu ALC evalutation board */
129 #endif /* ALC_EVAL */
131 /* argument manipulation for ansi or non ansi function prototypes */
133 #ifdef ANSI /* ansi */
139 /* type definition for ansi or non ansi pointers */
141 typedef void *Ptr; /* ANSI vanilla pointer type definition */
143 typedef char *Ptr; /* K&R vanilla pointer type definition */
147 /**********************************************************************
149 **********************************************************************/
152 these defines are arranged first by environment (DOS, UNIX, SUNOS or
153 embedded) followed by compiler (microsoft c, borland, unix or
154 microtec c) as appropriate.
156 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
157 #ifndef SS_4GMX_LCORE
158 /* envdep_h_001.main_76 Force definition of WIN32 when detecting WIN64 */
159 #if defined(_WIN32) || defined(_WIN64) /* dos, nt win32 */
166 #ifdef WIN32 /* dos, nt win32 */
167 #define INTERRPT /* interrupt */
168 #define ASM /* in-line assembly code */
169 #define ISR_PUSH_ENV /* isr push environment */
170 #define ISR_POP_ENV /* isr pop environment */
172 #define M_I86CM /* Intel 80x86 compact model */
174 #define BIOSKEY _bios_keybrd
175 #define BIOSTOD _bios_timeofday
176 #define DOSKEEP _dos_keep
177 #define DOSGETDATE _dos_getdate
178 #define DOSGETTIME _dos_gettime
179 #define DOSDATE dosdate_t
180 #define DOSTIME dostime_t
181 #define DOSSIZE size_t
182 #define DOSENABLE _enable
183 #define DOSDISABLE _disable
184 #define DOSGETVECT _dos_getvect
185 #define DOSSETVECT _dos_setvect
186 #define DOSINT86 int86
187 #define DOSINT86X int86x
188 #define DOSMALLOC malloc
189 #define DOSEXIT _exit
192 #define KEYBRD_READY _KEYBRD_READY
193 #define KEYBRD_READ _KEYBRD_READ
194 #define TIME_GETCLOCK _TIME_GETCLOCK
197 /*envdep_h_001.main_75 : RMIOS related changes*/
199 #define INTERRPT /* interrupt */
200 #define ASM /* in-line assembly code */
201 #define ISR_PUSH_ENV /* isr push environment */
202 #define ISR_POP_ENV /* isr pop environment */
205 #if (defined(VXWORKS_PENTIUM) || defined(VXWORKS_DIAB))
206 #define INTERRPT /* interrupt */
207 #define ASM /* in-line assembly code */
208 #define ISR_PUSH_ENV /* isr push environment */
209 #define ISR_POP_ENV /* isr pop environment */
211 #define M_I86CM /* Intel 80x86 compact model */
213 #define BIOSKEY _bios_keybrd
214 #define BIOSTOD _bios_timeofday
215 #define DOSKEEP _dos_keep
216 #define DOSGETDATE _dos_getdate
217 #define DOSGETTIME _dos_gettime
218 #define DOSDATE dosdate_t
219 #define DOSTIME dostime_t
220 #define DOSSIZE size_t
221 #define DOSENABLE _enable
222 #define DOSDISABLE _disable
223 #define DOSGETVECT _dos_getvect
224 #define DOSSETVECT _dos_setvect
225 #define DOSINT86 int86
226 #define DOSINT86X int86x
227 #define DOSMALLOC malloc
228 #define DOSEXIT _exit
231 #define KEYBRD_READY _KEYBRD_READY
232 #define KEYBRD_READ _KEYBRD_READ
233 #define TIME_GETCLOCK _TIME_GETCLOCK
234 #endif /* VXWORKS_PENTIUM */
238 #ifdef MSC51 /* dos, microsoft c */
239 #ifdef M_I86HM /* Intel 80x86 huge model */
240 #define INTERRPT _interrupt /* interrupt */
242 #define INTERRPT _interrupt far /* interrupt */
244 #define ASM /* in-line assembly code */
245 #define ISR_PUSH_ENV /* isr push environment */
246 #define ISR_POP_ENV /* isr pop environment */
247 #define BIOSKEY _bios_keybrd
248 #define BIOSTOD _bios_timeofday
249 #define DOSGETDATE _dos_getdate
250 #define DOSGETTIME _dos_gettime
251 #define DOSDATE dosdate_t
252 #define DOSTIME dostime_t
253 #define DOSENABLE _enable
254 #define DOSDISABLE _disable
255 #define DOSGETVECT _dos_getvect
256 #define DOSSETVECT _dos_setvect
257 #define DOSEXIT _exit
259 #define KEYBRD_READY _KEYBRD_READY
260 #define KEYBRD_READ _KEYBRD_READ
261 #define TIME_GETCLOCK _TIME_GETCLOCK
263 #ifdef M_I86SM /* Intel 80x86 small model */
267 #ifdef M_I86MM /* Intel 80x86 medium model */
271 #ifdef M_I86CM /* Intel 80x86 compact model */
275 #ifdef M_I86LM /* Intel 80x86 large model */
279 #ifdef M_I86HM /* Intel 80x86 huge model */
283 #ifdef BOR31 /* dos, borland c */
284 #define INTERRPT _interrupt far /* interrupt */
285 #define ASM /* in-line assembly code */
286 #define ISR_PUSH_ENV /* isr push environment */
287 #define ISR_POP_ENV /* isr pop environment */
289 #define I86LM /* Intel 80x86 large model */
291 #define BIOSKEY _bios_keybrd
292 #define BIOSTOD _bios_timeofday
293 #define DOSKEEP _dos_keep
294 #define DOSGETDATE _dos_getdate
295 #define DOSGETTIME _dos_gettime
296 #define DOSDATE dosdate_t
297 #define DOSTIME dostime_t
298 #define DOSSIZE size_t
299 #define DOSENABLE _enable
300 #define DOSDISABLE _disable
301 #define DOSGETVECT _dos_getvect
302 #define DOSSETVECT _dos_setvect
303 #define DOSINT86 int86
304 #define DOSINT86X int86x
305 #define DOSMALLOC malloc
306 #define DOSEXIT _exit
309 #define KEYBRD_READY _KEYBRD_READY
310 #define KEYBRD_READ _KEYBRD_READ
311 #define TIME_GETCLOCK _TIME_GETCLOCK
312 #else /* not BOR31 */
316 #ifdef UNIX /* unix */
317 #define INTERRPT /* interrupt */
318 #define ASM /* in-line assembly code */
319 #define ISR_PUSH_ENV /* isr push environment */
320 #define ISR_POP_ENV /* isr pop environment */
323 #ifdef __alpha /* alpha */
328 #ifdef SUNOS /* sun os */
329 #define PROC_SPARC /* sparc model */
330 #define UNIX /* unix */
332 #define INTERRPT /* interrupt */
333 #define ASM /* in-line assembly code */
334 #define ISR_PUSH_ENV /* isr push environment */
335 #define ISR_POP_ENV /* isr pop environment */
336 #else /* not SUNOS */
337 #ifdef HPOS /* HP os */
338 #define PROC_PARISC /* HP PA model */
339 #define UNIX /* unix */
341 #define INTERRPT /* interrupt */
342 #define ASM /* in-line assembly code */
343 #define ISR_PUSH_ENV /* isr push environment */
344 #define ISR_POP_ENV /* isr pop enviroment */
346 #ifdef MOTADS /* embedded, motorola ads */
347 #define PROC_68302 /* enable 68302 specific defines */
348 #define M68 /* motorola 68000 */
350 #ifdef DOSMRI42D /* DOS microtec c cross-compiler */
351 #define MRI68K /* microtec 68K c compiler */
352 #define INTERRPT interrupt /* interrupt */
353 #define ASM asm /* in-line assembly code */
354 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
355 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
356 #endif /* DOSMRI42D */
358 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
359 #define MRI68K /* microtec 68K c compiler */
360 #define INTERRPT interrupt /* interrupt */
361 #define ASM asm /* in-line assembly code */
362 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
363 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
364 #endif /* SOLMRI43 */
366 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
367 #define INTERRPT /* interrupt */
369 #define ASM __asm /* in-line assembly code */
371 #define ASM asm /* in-line assembly code */
373 #define ISR_PUSH_ENV /* isr push environment */
374 #define ISR_POP_ENV /* isr pop environment */
375 #endif /* SOLOAS186 */
377 #else /* not MOTADS */
378 #ifdef ELVIS /* elvis specific (not sun os) */
379 #define M68 /* motorola 68000 */
381 #ifdef DOSMRI42D /* DOS microtec c cross-compiler */
382 #define MRI68K /* microtec 68K c compiler */
383 #define INTERRPT interrupt /* interrupt */
384 #define ASM asm /* in-line assembly code */
385 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
386 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
387 #endif /* DOSMRI42D */
389 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
390 #define MRI68K /* microtec 68K c compiler */
391 #define INTERRPT interrupt /* interrupt */
392 #define ASM asm /* in-line assembly code */
393 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
394 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
395 #endif /* SOLMRI43 */
397 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
398 #define INTERRPT /* interrupt */
400 #define ASM __asm /* in-line assembly code */
402 #define ASM asm /* in-line assembly code */
404 #define ISR_PUSH_ENV /* isr push environment */
405 #define ISR_POP_ENV /* isr pop environment */
406 #endif /* SOLOAS186 */
408 #else /* not ELVIS */
410 #ifdef MSC51 /* embedded, microsoft c */
411 #ifdef M_I86HM /* Intel 80x86 huge model */
412 #define INTERRPT _interrupt /* interrupt */
413 #else /* not M_I86HM */
414 #define INTERRPT _interrupt far /* interrupt */
416 #define ASM /* in-line assembly code */
417 #define ISR_PUSH_ENV /* isr push environment */
418 #define ISR_POP_ENV /* isr pop environment */
419 #define BIOSKEY _bios_keybrd
420 #define BIOSTOD _bios_timeofday
421 #define DOSGETDATE _dos_getdate
422 #define DOSGETTIME _dos_gettime
423 #define DOSDATE dosdate_t
424 #define DOSTIME dostime_t
425 #define DOSENABLE _enable
426 #define DOSDISABLE _disable
427 #define DOSGETVECT _dos_getvect
428 #define DOSSETVECT _dos_setvect
429 #define DOSEXIT _exit
432 #define KEYBRD_READY _KEYBRD_READY
433 #define KEYBRD_READ _KEYBRD_READ
434 #define TIME_GETCLOCK _TIME_GETCLOCK
436 #ifdef M_I86SM /* Intel 80x86 small model */
440 #ifdef M_I86MM /* Intel 80x86 medium model */
444 #ifdef M_I86CM /* Intel 80x86 compact model */
448 #ifdef M_I86LM /* Intel 80x86 large model */
452 #ifdef M_I86HM /* Intel 80x86 huge model */
455 #else /* not MSC51 */
456 #ifdef BOR31 /* embedded, borland c */
457 #define INTERRPT /* interrupt */
458 #define ASM /* in-line assembly code */
459 #define ISR_PUSH_ENV /* isr push environment */
460 #define ISR_POP_ENV /* isr pop environment */
461 #define I86LM /* Intel 80x86 large model */
463 #define BIOSKEY _bios_keybrd
464 #define BIOSTOD _bios_timeofday
465 #define DOSKEEP _dos_keep
466 #define DOSGETDATE _dos_getdate
467 #define DOSGETTIME _dos_gettime
468 #define DOSDATE dosdate_t
469 #define DOSTIME dostime_t
470 #define DOSSIZE size_t
471 #define DOSENABLE _enable
472 #define DOSDISABLE _disable
473 #define DOSGETVECT _dos_getvect
474 #define DOSSETVECT _dos_setvect
475 #define DOSINT86 int86
476 #define DOSINT86X int86x
477 #define DOSMALLOC malloc
478 #define DOSEXIT _exit
481 #define KEYBRD_READY _KEYBRD_READY
482 #define KEYBRD_READ _KEYBRD_READ
483 #define TIME_GETCLOCK _TIME_GETCLOCK
484 #else /* not BOR31 */
485 #ifdef DOSMRI42D /* dos microtec c cross-compiler */
486 #define MRI68K /* microtec 68K c compiler */
487 #define INTERRPT interrupt /* interrupt */
488 #define ASM asm /* in-line assembly code */
489 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
490 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
492 #define M68 /* motorola 68000 */
494 #else /* DOSMRI42D */
495 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
496 #define MRI68K /* microtec 68K c compiler */
497 #define INTERRPT interrupt /* interrupt */
498 #define ASM asm /* in-line assembly code */
499 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
500 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
502 #define M68 /* motorola 68000 */
504 #else /* not SOLMRI43 */
505 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
506 #define INTERRPT /* interrupt */
508 #define ASM __asm /* in-line assembly code */
510 #define ASM asm /* in-line assembly code */
512 #define ISR_PUSH_ENV /* isr push environment */
513 #define ISR_POP_ENV /* isr pop environment */
514 #ifdef m68k /* motorola 68000 series */
515 #define M68 /* motorola 68000 */
517 #else /* not SOLOAS186 */
524 #define ASM __asm__ /* in-line assembly code */
525 #define ISR_PUSH_ENV /* isr push environment */
526 #define ISR_POP_ENV /* isr pop environment */
529 #define INTERRPT interrupt
530 #define ASM asm /* in-line assembly code */
531 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push env */
532 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop env */
534 #endif /* __GNUCC__ */
542 #define ASM __asm__ /* in-line assembly code */
543 #define ISR_PUSH_ENV /* isr push environment */
544 #define ISR_POP_ENV /* isr pop environment */
545 #else /* not gnu cc */
547 #define INTERRPT interrupt
548 #define ASM asm /* in-line assembly code */
549 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push env */
550 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop env */
552 #endif /* __GNUCC__ */
556 #define MRI68K /* microtec 68K c compiler */
557 #define INTERRPT interrupt /* interrupt */
558 #define ASM asm /* in-line assembly code */
559 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push environment */
560 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop environment */
562 #define M68 /* motorola 68000 */
564 #endif /* SOLMRI43 */
572 #define ASM __asm__ /* in-line assembly code */
573 #define ISR_PUSH_ENV /* isr push environment */
574 #define ISR_POP_ENV /* isr pop environment */
575 #else /* not gnu cc */
577 #define INTERRPT interrupt
578 #define ASM asm /* in-line assembly code */
579 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push env */
580 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop env */
582 #endif /* __GNUCC__ */
583 #else /* not GSIP302 */
590 #define ASM __asm__ /* in-line assembly code */
591 #define ISR_PUSH_ENV /* isr push environment */
592 #define ISR_POP_ENV /* isr pop environment */
595 #define INTERRPT interrupt
596 #define ASM asm /* in-line assembly code */
597 #define ISR_PUSH_ENV ASM(" movem.l d2-d7/a2-a6,-(a7)") /* isr push env */
598 #define ISR_POP_ENV ASM(" movem.l (a7)+,d2-d7/a2-a6") /* isr pop env */
600 #endif /* __GNUCC__ */
601 #else /* not VB_360 */
602 #ifdef PQ_PPC860 /* Force PowerQUICC board */
603 #define PROC_PPC /* any PowerPC processor */
604 #define PROC_PPC860 /* MPC860 processor */
605 #ifdef __GNUC__ /* gnu C compiler */
607 #define ASM __asm__ /* in-line assembly code */
608 #define ISR_PUSH_ENV /* isr push environment */
609 #define ISR_POP_ENV /* isr pop environment */
611 #ifdef _MCCPPC /* micortech C compiler */
613 #define ASM asm /* in-line assembly code */
614 #define ISR_PUSH_ENV /* isr push env */
615 #define ISR_POP_ENV /* isr pop env */
617 #endif /* __GNUCC__ */
618 #else /* NOT PQ_PPC860 */
624 #define ASM __asm__ /* in-line assembly code */
625 #define ISR_PUSH_ENV /* isr push environment */
626 #define ISR_POP_ENV /* isr pop environment */
630 #define ASM asm /* in-line assembly code */
631 #define ISR_PUSH_ENV /* isr push env */
632 #define ISR_POP_ENV /* isr pop env */
634 #endif /* __GNUCC__ */
636 #ifdef SS_PS /* pSOS RTOS */
638 #define ASM __asm /* in-line assembly code */
639 #define ISR_PUSH_ENV /* isr push env */
640 #define ISR_POP_ENV /* isr pop env */
641 #else /* not SS_PS */
642 #define OTHMOD /* other model */
645 #endif /* PQ_PPC860 */
648 #endif /* ALC_EVAL */
649 #endif /* QUICCADS */
650 #endif /* MOTDCI_68360 */
651 #endif /* SOLOAS186 */
652 #endif /* SOLMRI43 */
653 #endif /* DOSMRI42D */
664 /**********************************************************************
666 **********************************************************************/
669 these typedefs are arranged first by environment (DOS, UNIX or
670 embedded) followed by compiler (microsoft c, borland c, unix or
671 microtec c) as appropriate.
675 #ifdef MSC51 /* dos, microsoft c */
677 typedef unsigned char Bool; /* boolean */
678 typedef char S8; /* signed - 8 bits */
679 typedef unsigned char U8; /* unsigned - 8 bits */
681 typedef int S16; /* signed - 16 bits */
682 typedef unsigned int U16; /* unsigned - 16 bits */
684 typedef long S32; /* signed - 32 bits */
685 typedef unsigned long U32; /* unsigned - 32 bits */
686 /* envdep_h_001.main_71 */
687 typedef __int64 S64; /* signed - 64 bits */
688 typedef unsigned __int64 U64; /* unsigned - 64 bits */
693 note: if typedef Void is set to S16 then RETVOID must be set
694 to: return(ROK). if typedef Void is set to void then RETVOID
695 must be set to: return
698 /* envdep_h_001.main_78 Change typedef void to #define void*/
701 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
702 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
703 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
704 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
705 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
707 #else /* not MSC51 */
708 #ifdef BOR31 /* dos, borland c */
710 typedef unsigned char Bool; /* boolean */
711 typedef char S8; /* signed - 8 bits */
712 typedef unsigned char U8; /* unsigned - 8 bits */
714 typedef int S16; /* signed - 16 bits */
715 typedef unsigned int U16; /* unsigned - 16 bits */
717 typedef long S32; /* signed - 32 bits */
718 typedef unsigned long U32; /* unsigned - 32 bits */
723 note: if typedef Void is set to S16 then RETVOID must be set
724 to: return(ROK). if typedef Void is set to void then RETVOID
725 must be set to: return
728 typedef void Void; /* void */
730 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
731 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
732 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
733 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
734 typedef Void (INTERRPT far *PIF) ARGS((void )); /* pointer to interrupt function */
736 #else /* not BOR31 */
740 #ifdef UNIX /* unix */
742 typedef unsigned char Bool; /* boolean */
743 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
744 #if !(defined(SS_4GMX_LCORE) || defined(SS_4GMX_UCORE))
745 typedef char S8; /* signed - 8 bits */
747 /*envdep_h_001.main_78 :removed signed to supress sprintf' differ in signedness warnings */
748 typedef char S8; /* signed - 8 bits*/
750 typedef unsigned char U8; /* unsigned - 8 bits */
752 typedef short S16; /* signed - 16 bits */
753 typedef unsigned short U16; /* unsigned - 16 bits */
755 #if !(defined(ALPHA) || defined(BIT_64))
756 typedef long S32; /* signed - 32 bits */
757 typedef unsigned long U32; /* unsigned - 32 bits */
758 /* envdep_h_001.main_71 */
760 /* envdep_h_001.main_79 RVDT compiler warning fix */
761 #ifndef SS_4GMX_LCORE
762 /* envdep_h_001.main_72: Support for C89 standard */
763 __extension__ typedef long long S64; /* signed - 64 bits */
764 __extension__ typedef unsigned long long U64; /* unsigned - 64 bits */
766 typedef long long S64; /* signed - 64 bits */
767 typedef unsigned long long U64; /* unsigned - 64 bits */
768 #define Void void /* RVDT compiler warning fix */
769 #endif /* SS_4GMX_LCORE */
771 typedef long long S64; /* signed - 64 bits */
772 typedef unsigned long long U64; /* unsigned - 64 bits */
773 #endif /* SS_LINUX */
774 #else /* ALPHA & BIT_64 */
775 typedef int S32; /* signed - 32 bits */
776 typedef unsigned int U32; /* unsigned - 32 bits */
777 /* envdep_h_001.main_71 */
778 typedef long S64; /* signed - 64 bits */
779 typedef unsigned long U64; /* unsigned - 64 bits */
780 #endif /* ALPHA & BIT_64 */
781 /* 1. Added F32 and F64 */
783 typedef float F32; /* float - 32 bits */
784 typedef double F64; /* double - 64 bits */
785 #endif /* SS_FLOAT */
790 note: if typedef Void is set to S16 then RETVOID must be set
791 to: return(ROK). if typedef Void is set to void then RETVOID
792 must be set to: return
798 /* envdep_h_001.main_79 RVDT compiler warning fix */
799 #ifndef SS_4GMX_LCORE
800 typedef void Void; /* void */
804 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
805 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
806 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
807 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning VOID */
808 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
811 #ifdef PROC_68302 /* embedded, motorola ads */
812 #ifdef DOSMRI42D /* dos microtec c cross-compiler */
814 typedef unsigned char Bool; /* boolean */
815 typedef char S8; /* signed - 8 bits */
816 typedef unsigned char U8; /* unsigned - 8 bits */
818 typedef short S16; /* signed - 16 bits */
819 typedef unsigned short U16; /* unsigned - 16 bits */
821 typedef int S32; /* signed - 32 bits */
822 typedef unsigned int U32; /* unsigned - 32 bits */
825 /* size_t is not defined, for some odd reason, in mcc68k's stddef.h */
826 typedef unsigned size_t; /* size_t */
827 #endif /* not ANSI */
832 note: if typedef Void is set to S16 then RETVOID must be set
833 to: return(ROK). if typedef Void is set to void then RETVOID
834 must be set to: return
837 typedef void Void; /* void */
838 typedef Void VOID; /* void */
840 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
841 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
842 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
843 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
844 typedef Void (*PIF) ARGS((void )); /* pointer to interrupt function */
846 #else /* not DOSMRI42D */
847 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
849 typedef unsigned char Bool; /* boolean */
850 typedef char S8; /* signed - 8 bits */
851 typedef unsigned char U8; /* unsigned - 8 bits */
853 typedef short S16; /* signed - 16 bits */
854 typedef unsigned short U16; /* unsigned - 16 bits */
856 typedef int S32; /* signed - 32 bits */
857 typedef unsigned int U32; /* unsigned - 32 bits */
862 note: if typedef Void is set to S16 then RETVOID must be set
863 to: return(ROK). if typedef Void is set to void then RETVOID
864 must be set to: return
867 typedef void Void; /* void */
868 typedef Void VOID; /* void */
870 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
871 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
872 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
873 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
874 typedef Void (*PIF) ARGS((void )); /* pointer to interrupt function */
876 #else /* not SOLMRI43 */
877 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
879 typedef unsigned char Bool; /* boolean */
880 typedef char S8; /* signed - 8 bits */
881 typedef unsigned char U8; /* unsigned - 8 bits */
883 typedef short S16; /* signed - 16 bits */
884 typedef unsigned short U16; /* unsigned - 16 bits */
886 typedef int S32; /* signed - 32 bits */
887 typedef unsigned int U32; /* unsigned - 32 bits */
892 note: if typedef Void is set to S16 then RETVOID must be set
893 to: return(ROK). if typedef Void is set to void then RETVOID
894 must be set to: return
897 typedef void Void; /* void */
898 typedef Void VOID; /* void */
900 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
901 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
902 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
903 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
904 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
906 #else /* not SOLOAS186 */
907 #ifdef __GNUC__ /* if GNUC cross compiler */
909 typedef unsigned char Bool; /* boolean */
910 typedef char S8; /* signed - 8 bits */
911 typedef unsigned char U8; /* unsigned - 8 bits */
913 typedef short S16; /* signed - 16 bits */
914 typedef unsigned short U16; /* unsigned - 16 bits */
916 typedef int S32; /* signed - 32 bits */
917 typedef unsigned int U32; /* unsigned - 32 bits */
918 /* envdep_h_001.main_71 */
919 typedef long long S64; /* signed - 64 bits */
920 typedef unsigned long long U64; /* unsigned - 64 bits */
921 /* 1. Added F32 and F64 types */
923 typedef float F32; /* float - 32 bits */
924 typedef double F64; /* double - 64 bits */
925 #endif /* SS_FLOAT */
930 note: if typedef Void is set to S16 then RETVOID must be set
931 to: return(ROK). if typedef Void is set to void then RETVOID
932 must be set to: return
935 typedef void Void; /* void */
936 typedef Void VOID; /* void */
938 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
939 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
940 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
941 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
942 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
944 #else /* not __GNUC__ */
946 #endif /* SOLOAS186 */
947 #endif /* SOLMRI43 */
948 #endif /* DOSMRI42D */
949 #else /* not PROC_68302 */
952 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
953 typedef unsigned char Bool; /* boolean */
954 typedef char S8; /* signed - 8 bits */
955 typedef unsigned char U8; /* unsigned - 8 bits */
957 typedef short S16; /* signed - 16 bits */
958 typedef unsigned short U16; /* unsigned - 16 bits */
960 typedef int S32; /* signed - 32 bits */
961 typedef unsigned int U32; /* unsigned - 32 bits */
966 note: if typedef Void is set to S16 then RETVOID must be set
967 to: return(ROK). if typedef Void is set to void then RETVOID
968 must be set to: return
971 typedef void Void; /* void */
972 typedef Void VOID; /* void */
974 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
975 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
976 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
977 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
978 typedef INTERRPT Void (*PIF) ARGS((void)); /* pointer to interrupt function */
979 #endif /* SOLMRI43 */
980 #else /* not PROC_68040 */
983 typedef unsigned char Bool; /* boolean */
984 typedef char S8; /* signed - 8 bits */
985 typedef unsigned char U8; /* unsigned - 8 bits */
987 typedef short S16; /* signed - 16 bits */
988 typedef unsigned short U16; /* unsigned - 16 bits */
990 typedef long S32; /* signed - 32 bits */
991 typedef unsigned long U32; /* unsigned - 32 bits */
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 INTERRPT Void (*PIF) ARGS((void )); /* pointer to interrupt function */
1009 #else /* not PROC_68360 */
1012 typedef unsigned char Bool; /* boolean */
1013 typedef char S8; /* signed - 8 bits */
1014 typedef unsigned char U8; /* unsigned - 8 bits */
1016 typedef short S16; /* signed - 16 bits */
1017 typedef unsigned short U16; /* unsigned - 16 bits */
1019 typedef int S32; /* signed - 32 bits */
1020 typedef unsigned int U32; /* unsigned - 32 bits */
1021 /* envdep_h_001.main_76 Take care of the windows compiler non compliance
1022 * to ANSI-C for data type ranges
1024 typedef long long S64; /* signed - 64 bits */
1025 typedef unsigned long long U64; /* unsigned - 64 bits */
1027 /* 1. Added F32 and F64 types */
1029 typedef float F32; /* float - 32 bits */
1030 typedef double F64; /* double - 64 bits */
1031 #endif /* SS_FLOAT */
1035 note: if typedef Void is set to S16 then RETVOID must be set
1036 to: return(ROK). if typedef Void is set to void then RETVOID
1037 must be set to: return
1040 typedef void Void; /* void */
1042 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1043 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1044 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1045 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1046 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
1048 #else /* not WIN32 */
1050 typedef unsigned char Bool; /* boolean */
1051 typedef char S8; /* signed - 8 bits */
1052 typedef unsigned char U8; /* unsigned - 8 bits */
1054 typedef short S16; /* signed - 16 bits */
1055 typedef unsigned short U16; /* unsigned - 16 bits */
1057 typedef long S32; /* signed - 32 bits */
1058 typedef unsigned long U32; /* unsigned - 32 bits */
1063 note: if typedef Void is set to S16 then RETVOID must be set
1064 to: return(ROK). if typedef Void is set to void then RETVOID
1065 must be set to: return
1068 typedef void Void; /* void */
1070 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1071 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1072 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1073 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1074 typedef INTERRPT Void (*PIF) ARGS((void )); /* pointer to interrupt function */
1076 #else /* not PROC_68349 */
1079 typedef unsigned char Bool; /* boolean */
1080 typedef char S8; /* signed - 8 bits */
1081 typedef unsigned char U8; /* unsigned - 8 bits */
1083 typedef short S16; /* signed - 16 bits */
1084 typedef unsigned short U16; /* unsigned - 16 bits */
1086 typedef long S32; /* signed - 32 bits */
1087 typedef unsigned long U32; /* unsigned - 32 bits */
1089 /* envdep_h_001.main_74 - additions */
1090 typedef long long S64; /* signed - 64 bits */
1091 typedef unsigned long long U64; /* unsigned - 64 bits */
1093 typedef int S32; /* signed - 32 bits */
1094 typedef unsigned int U32; /* unsigned - 32 bits */
1095 typedef long S64; /* signed - 64 bits */
1096 typedef unsigned long U64; /* unsigned - 64 bits */
1099 /* 1. Added F32 and F64 types */
1101 typedef float F32; /* float - 32 bits */
1102 typedef double F64; /* double - 64 bits */
1103 #endif /* SS_FLOAT */
1107 note: if typedef Void is set to S16 then RETVOID must be set
1108 to: return(ROK). if typedef Void is set to void then RETVOID
1109 must be set to: return
1112 typedef void Void; /* void */
1114 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1115 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1116 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1117 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1118 typedef INTERRPT Void (*PIF) ARGS((void )); /* pointer to interrupt function */
1120 #else /* not PROC_PPC */
1123 typedef unsigned char Bool; /* boolean */
1124 typedef char S8; /* signed - 8 bits */
1125 typedef unsigned char U8; /* unsigned - 8 bits */
1127 typedef short S16; /* signed - 16 bits */
1128 typedef unsigned short U16; /* unsigned - 16 bits */
1131 typedef long S32; /* signed - 32 bits */
1132 typedef unsigned long U32; /* unsigned - 32 bits */
1134 /* envdep_h_001.main_71 - additions */
1135 typedef int64_t S64; /* signed - 64 bits */
1136 typedef uint64_t U64; /* unsigned - 64 bits */
1138 typedef int S32; /* signed - 32 bits */
1139 typedef unsigned int U32; /* unsigned - 32 bits */
1140 typedef long S64; /* signed - 64 bits */
1141 typedef unsigned long U64; /* unsigned - 64 bits */
1147 note: if typedef Void is set to S16 then RETVOID must be set
1148 to: return(ROK). if typedef Void is set to void then RETVOID
1149 must be set to: return
1152 typedef void Void; /* void */
1154 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1155 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1156 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1157 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1158 typedef Void (INTERRPT *PIF) ARGS((void )); /* pointer to interrupt function */
1160 #else /* not SS_PS */
1162 typedef unsigned char Bool; /* boolean */
1163 typedef char S8; /* signed - 8 bits */
1164 typedef unsigned char U8; /* unsigned - 8 bits */
1166 typedef int S16; /* signed - 16 bits */
1167 typedef unsigned int U16; /* unsigned - 16 bits */
1169 typedef long S32; /* signed - 32 bits */
1170 typedef unsigned long U32; /* unsigned - 32 bits */
1175 note: if typedef Void is set to S16 then RETVOID must be set
1176 to: return(ROK). if typedef Void is set to void then RETVOID
1177 must be set to: return
1180 typedef void Void; /* void */
1182 typedef S8 (*PFS8) ARGS((void )); /* pointer to function returning S8 */
1183 typedef S16 (*PFS16) ARGS((void )); /* pointer to function returning S16 */
1184 typedef S32 (*PFS32) ARGS((void )); /* pointer to function returning S32 */
1185 typedef Void (*PFVOID) ARGS((void )); /* pointer to function returning Void */
1186 typedef INTERRPT Void (*PIF) ARGS((void )); /* pointer to interrupt function */
1189 #endif /* PROC_PPC */
1190 #endif /* PROC_68349 */
1192 #endif /* PROC_68360 */
1193 #endif /* PROC_68040 */
1194 #endif /* PROC_68302 */
1199 /* scope control keywords */
1203 #define PUBLIC /* public is c default scope */
1204 #else /* not PUBLIC */
1210 #define PRIVATE static /* private is c static scope */
1211 #else /* not PRIVATE */
1212 #define PRIVATE static /* private is c static scope */
1213 #endif /* PRIVATE */
1217 #define EXTERN extern
1218 #else /* not EXTERN */
1219 #define EXTERN extern
1224 #define CONSTANT const /* constant */
1229 #ifdef _MCC68K /* microtec 68K cross compiler */
1233 #define VOLATILE volatile /* volatile */
1235 #define VOLATILE volatile
1238 #if _STR_CMP(_VERSION,"4.4") >= 0 /* MCC68K only, check version */
1241 #define INLINE inline /* inline */
1242 #else /* not INLINE */
1243 #define INLINE inline /* inline */
1246 #define INLINE /* no inline */
1247 #endif /* __STR_CMP */
1248 #else /* not _MCC68K */
1250 #ifndef __STRICT_ANSI__
1253 #define INLINE __inline__
1254 #else /* not inline */
1255 #define INLINE __inline__
1257 #else /* not strict ansi */
1261 #else /* not inline */
1264 #endif /* __STRICT_ANSI */
1267 #define VOLATILE volatile /* volatile */
1268 #else /* volatile */
1269 #define VOLATILE volatile
1271 #else /* not gnuc */
1275 #define VOLATILE volatile
1276 #else /* VOLATILE */
1277 #define VOLATILE volatile
1278 #endif /* VOLATILE */
1286 #else /* not WIN32 */
1290 #define VOLATILE /* volatile */
1292 #define VOLATILE /* volatile */
1293 #endif /* VOLATILE */
1303 #endif /* __GNUC__ */
1304 #endif /* _MCC68K */
1306 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
1307 /*envdep_h_001.main_78 : removed SSI-4GMX specfic changes*/
1310 #define VOLATILE volatile
1312 #define VOLATILE volatile
1323 /**********************************************************************
1324 prototypes for sprintf
1325 **********************************************************************/
1327 /*envdep_h_001.main_75 : RMIOS related changes*/
1332 EXTERN S8 *sprintf ARGS((S8 *buffer, CONSTANT S8 *format, /* args */ ...));
1335 #else /* not SUNOS51 */
1337 EXTERN int sprintf ARGS((S8 *s, CONSTANT S8 *format, /* args */ ... ));
1340 EXTERN Void sprintf ARGS((S8 *outbuf, S8 *fmt, /* args */ ...)); /* td68k.x */
1344 EXTERN int sprintf ARGS((S8 *buffer,CONSTANT S8 *format, /* args */ ...));
1347 EXTERN int sprintf ARGS((S8 *buffer,CONSTANT S8 *format, /* args */ ...));
1350 EXTERN int sprintf ARGS((S8 *buffer,CONSTANT S8 *format, /* args */ ...));
1354 #endif /* _MCC68K */
1356 #endif /* SUNOS51 */
1357 #endif /* SUNOS41 */
1358 #endif /* STDIO_INCLD */
1362 /**********************************************************************
1363 defines for pointers, pointer sizes, stack alignment and registers
1364 **********************************************************************/
1367 defines are provided for: intel 80x86 small, intel 80x86 medium,
1368 intel 80x86 compact, intel 80x86 large, intel huge, motorola 68000,
1369 sparc, vax and other processors.
1372 #ifdef I86SM /* Intel 80x86 small model */
1374 #define NULLP 0 /* null pointer */
1375 #define NULLD 0L /* null data */
1376 #define PTR U16 /* pointer */
1377 #define PTRSIZE sizeof(U16) /* pointer size */
1378 #define STKALIGN 2 /* stack alignment */
1380 #define REG1 register /* register 1 - highest priority */
1381 #define REG2 register /* register 2 */
1382 #define REG3 /* register 3 */
1383 #define REG4 /* register 4 */
1384 #define REG5 /* register 5 */
1385 #define REG6 /* register 6 */
1386 #define REG7 /* register 7 */
1387 #define REG8 /* register 8 - lowest priority */
1389 #define FAR /* for small model */
1390 #define PTRSTRIDE 1 /* stride */
1391 #define MEM_SEG /* memory - segmented */
1394 #ifdef I86MM /* Intel 80x86 medium model */
1396 #define NULLP 0 /* null pointer */
1397 #define NULLD 0L /* null data */
1398 #define PTR U16 /* pointer */
1399 #define PTRSIZE sizeof(U16) /* pointer size */
1400 #define STKALIGN 2 /* stack alignment */
1402 #define REG1 register /* register 1 - highest priority */
1403 #define REG2 register /* register 2 */
1404 #define REG3 /* register 3 */
1405 #define REG4 /* register 4 */
1406 #define REG5 /* register 5 */
1407 #define REG6 /* register 6 */
1408 #define REG7 /* register 7 */
1409 #define REG8 /* register 8 - lowest priority */
1411 #define FAR /* for medium model */
1412 #define PTRSTRIDE 1 /* stride */
1413 #define MEM_SEG /* memory - segmented */
1416 #ifdef I86CM /* Intel 80x86 compact model */
1418 #define NULLP 0L /* null pointer */
1419 #define NULLD 0L /* null data */
1421 #define PTR U32 /* pointer */
1422 #define PTRSIZE sizeof(U32) /* pointer size */
1423 /* #define PTRFAR pointer far */
1424 #define STKALIGN 4 /* stack alignment */
1426 #define PTR U64 /* pointer */
1427 /* envdep_h_001.main_78:Warning fix*/
1428 #define PTRSIZE sizeof(U64) /* pointer size */
1429 /* #define PTRFAR pointer far */
1430 #define STKALIGN 8 /* stack alignment */
1434 #define REG1 register /* register 1 - highest priority */
1435 #define REG2 register /* register 2 */
1436 #define REG3 /* register 3 */
1437 #define REG4 /* register 4 */
1438 #define REG5 /* register 5 */
1439 #define REG6 /* register 6 */
1440 #define REG7 /* register 7 */
1441 #define REG8 /* register 8 - lowest priority */
1443 #define FAR far /* for compact model */
1444 #define PTRSTRIDE 1 /* stride */
1445 #define MEM_SEG /* memory - segmented */
1449 #ifdef I86LM /* Intel 80x86 large model */
1451 #define NULLP 0L /* null pointer */
1452 #define NULLD 0L /* null data */
1454 #define PTR U32 /* pointer */
1455 #define PTRSIZE sizeof(U32) /* pointer size */
1456 #define PTRFAR /* pointer far */
1457 #define STKALIGN 4 /* stack alignment */
1459 #define PTR U64 /* pointer */
1460 /* envdep_h_001.main_78:Warning fix*/
1461 #define PTRSIZE sizeof(U64) /* pointer size */
1462 /* #define PTRFAR pointer far */
1463 #define STKALIGN 8 /* stack alignment */
1466 #define REG1 register /* register 1 - highest priority */
1467 #define REG2 register /* register 2 */
1468 #define REG3 /* register 3 */
1469 #define REG4 /* register 4 */
1470 #define REG5 /* register 5 */
1471 #define REG6 /* register 6 */
1472 #define REG7 /* register 7 */
1473 #define REG8 /* register 8 - lowest priority */
1475 #define FAR far /* for large model */
1476 #define PTRSTRIDE 1 /* stride */
1477 #define MEM_SEG /* memory - segmented */
1480 #ifdef I86HM /* Intel 80x86 huge model */
1482 #define NULLP 0L /* null pointer */
1483 #define NULLD 0L /* null data */
1485 #define PTR U32 /* pointer */
1486 #define PTRSIZE sizeof(U32) /* pointer size */
1487 #define PTRFAR /* pointer far */
1488 #define STKALIGN 4 /* stack alignment */
1490 #define PTR U64 /* pointer */
1491 #define PTRSIZE sizeof(U64) /* pointer size */
1492 #define PTRFAR /* pointer far */
1493 #define STKALIGN 8 /* stack alignment */
1496 #define REG1 register /* register 1 - highest priority */
1497 #define REG2 register /* register 2 */
1498 #define REG3 /* register 3 */
1499 #define REG4 /* register 4 */
1500 #define REG5 /* register 5 */
1501 #define REG6 /* register 6 */
1502 #define REG7 /* register 7 */
1503 #define REG8 /* register 8 - lowest priority */
1505 #define FAR far /* for huge model */
1506 #define PTRSTRIDE 1 /* stride */
1507 #define MEM_SEG /* memory - segmented */
1510 #ifdef PROC_68XXX /* Motorola 68040 model */
1512 #define NULLP 0L /* null pointer */
1513 #define NULLD 0L /* null data */
1514 #define PTR U32 /* pointer */
1515 #define PTRSIZE sizeof(U32) /* pointer size */
1516 /* #define PTRFAR pointer far */
1517 #define STKALIGN 4 /* stack alignment */
1519 #define REG1 register /* register 1 - highest priority */
1520 #define REG2 register /* register 2 */
1521 #define REG3 register /* register 3 */
1522 #define REG4 register /* register 4 */
1523 #define REG5 register /* register 5 */
1524 #define REG6 register /* register 6 */
1525 #define REG7 register /* register 7 */
1526 #define REG8 register /* register 8 - lowest priority */
1528 #define FAR /* for large model */
1531 #define PTRSTRIDE 2 /* stride (simulation case: e.g. for elvis) */
1534 #define PTRSTRIDE 4 /* stride (simulation case: e.g. for elvis) */
1536 #define PTRSTRIDE 4 /* stride (simulation case: e.g. for elvis) */
1537 #endif /* PROC_68040 */
1538 #endif /* PROC_68302 */
1540 #define MEM_NONSEG /* memory - non-segmented */
1541 #endif /* PROC_68XXX */
1544 #ifdef PROC_SPARC /* SPARC */
1546 #define NULLP 0L /* null pointer */
1547 #define NULLD 0L /* null data */
1549 #define PTR U32 /* pointer */
1550 #define PTRSIZE sizeof(U32) /* pointer size */
1551 /* #define PTRFAR pointer far */
1552 #define STKALIGN 4 /* stack alignment */
1554 #define PTR U64 /* pointer */
1555 #define PTRSIZE sizeof(U64) /* pointer size */
1556 /* #define PTRFAR pointer far */
1557 #define STKALIGN 8 /* stack alignment */
1560 #define REG1 register /* register 1 - highest priority */
1561 #define REG2 register /* register 2 */
1562 #define REG3 register /* register 3 */
1563 #define REG4 register /* register 4 */
1564 #define REG5 register /* register 5 */
1565 #define REG6 register /* register 6 */
1566 #define REG7 register /* register 7 */
1567 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
1568 #ifndef SS_4GMX_LCORE
1569 #define REG8 register /* register 8 - lowest priority */
1572 #define FAR /* for large model */
1573 #define PTRSTRIDE 4 /* stride */
1574 #define MEM_NONSEG /* memory - non-segmented */
1575 #endif /* PROC_SPARC */
1576 #ifdef PROC_PARISC /* HP PA RISC */
1578 #define NULLP 0L /* null pointer */
1579 #define NULLD 0L /* null data */
1581 #define PTR U32 /* pointer */
1582 #define PTRSIZE sizeof(U32) /* pointer size */
1583 /* #define PTRFAR pointer far */
1584 #define STKALIGN 4 /* stack alignment */
1586 #define PTR U64 /* pointer */
1587 #define PTRSIZE sizeof(U64) /* pointer size */
1588 /* #define PTRFAR pointer far */
1589 #define STKALIGN 8 /* stack alignment */
1592 #define REG1 register /* register 1 - highest priority */
1593 #define REG2 register /* register 2 */
1594 #define REG3 register /* register 3 */
1595 #define REG4 register /* register 4 */
1596 #define REG5 register /* register 5 */
1597 #define REG6 register /* register 6 */
1598 #define REG7 register /* register 7 */
1599 #define REG8 register /* register 8 - lowest priority */
1601 #define FAR /* for large model */
1602 #define PTRSTRIDE 4 /* stride */
1603 #define MEM_NONSEG /* memory - non-segmented */
1604 #endif /* PROC_PARISC */
1606 /*envdep_h_001.main_75 : RMIOS related changes*/
1608 #define SPtr2l(ptr) ((unsigned long)(ptr))
1609 #define SPtr2ll(ptr) ((unsigned long long)(unsigned long)(ptr))
1610 #define SL2Ptr(l) ((PTR)(l))
1611 #define SLL2Ptr(ll) ((PTR)(ll & 0xFFFFFFFF))
1613 #define NULLP 0L /* null pointer */
1614 #define NULLD 0L /* null data */
1616 #define PTR U32 /* pointer */
1617 #define PTRSIZE sizeof(U32) /* pointer size */
1618 #define STKALIGN 4 /* stack alignment */
1620 #define PTR U64 /* pointer */
1621 #define PTRSIZE sizeof(U64) /* pointer size */
1622 #define STKALIGN 8 /* 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 */
1635 #ifdef VAX /* VAX */
1637 #define NULLP 0L /* null pointer */
1638 #define NULLD 0L /* null data */
1639 #define PTR U32 /* pointer */
1640 #define PTRSIZE sizeof(U32) /* pointer size */
1641 /* #define PTRFAR pointer far */
1642 #define STKALIGN 4 /* stack alignment */
1644 #define REG1 register /* register 1 - highest priority */
1645 #define REG2 register /* register 2 */
1646 #define REG3 register /* register 3 */
1647 #define REG4 register /* register 4 */
1648 #define REG5 register /* register 5 */
1649 #define REG6 register /* register 6 */
1650 #define REG7 register /* register 7 */
1651 #define REG8 register /* register 8 - lowest priority */
1653 #define FAR /* for large model */
1654 #define PTRSTRIDE 2 /* stride */
1655 #define MEM_NONSEG /* memory - non-segmented */
1659 #ifdef ALPHA /* ALPHA */
1661 #define NULLP 0L /* null pointer */
1662 #define NULLD 0L /* null data */
1663 #define PTR U64 /* pointer */
1664 #define PTRSIZE sizeof(U64) /* pointer size */
1665 /* #define PTRFAR pointer far */
1666 #define STKALIGN 8 /* stack alignment */
1668 #define REG1 register /* register 1 - highest priority */
1669 #define REG2 register /* register 2 */
1670 #define REG3 register /* register 3 */
1671 #define REG4 register /* register 4 */
1672 #define REG5 register /* register 5 */
1673 #define REG6 register /* register 6 */
1674 #define REG7 register /* register 7 */
1675 #define REG8 register /* register 8 - lowest priority */
1677 #define FAR /* for large model */
1678 #define PTRSTRIDE 2 /* stride */
1679 #define MEM_NONSEG /* memory - non-segmented */
1682 #ifdef PROC_68360 /* Motorola 68040 model */
1684 #define NULLP 0L /* null pointer */
1685 #define NULLD 0L /* null data */
1686 #define PTR U32 /* pointer */
1687 #define PTRSIZE sizeof(U32) /* pointer size */
1688 /* #define PTRFAR pointer far */
1689 #define STKALIGN 4 /* stack alignment */
1691 #define REG1 register /* register 1 - highest priority */
1692 #define REG2 register /* register 2 */
1693 #define REG3 register /* register 3 */
1694 #define REG4 register /* register 4 */
1695 #define REG5 register /* register 5 */
1696 #define REG6 register /* register 6 */
1697 #define REG7 register /* register 7 */
1698 #define REG8 register /* register 8 - lowest priority */
1700 #define FAR /* for large model */
1702 #define PTRSTRIDE 4 /* stride (simulation case: e.g. for elvis) */
1703 #define MEM_NONSEG /* memory - non-segmented */
1704 #endif /* PROC_68360 */
1707 #ifdef PROC_PPC /* SPARC */
1709 #define NULLP 0L /* null pointer */
1710 #define NULLD 0L /* null data */
1712 #define PTR U32 /* pointer */
1713 #define PTRSIZE sizeof(U32) /* pointer size */
1714 /* #define PTRFAR pointer far */
1715 #define STKALIGN 4 /* stack alignment */
1717 #define PTR U64 /* pointer */
1718 #define PTRSIZE sizeof(U64) /* pointer size */
1719 /* #define PTRFAR pointer far */
1720 #define STKALIGN 8 /* stack alignment */
1723 #define REG1 register /* register 1 - highest priority */
1724 #define REG2 register /* register 2 */
1725 #define REG3 register /* register 3 */
1726 #define REG4 register /* register 4 */
1727 #define REG5 register /* register 5 */
1728 #define REG6 register /* register 6 */
1729 #define REG7 register /* register 7 */
1730 #define REG8 register /* register 8 - lowest priority */
1732 #define FAR /* for large model */
1733 #define PTRSTRIDE 4 /* stride */
1734 #define MEM_NONSEG /* memory - non-segmented */
1735 #endif /* PROC_PPC */
1738 #ifdef SS_PS /* 32-bit pSOS */
1739 #define NULLP 0L /* null pointer */
1740 #define NULLD 0L /* null data */
1742 #define PTR U32 /* pointer */
1743 #define PTRSIZE sizeof(U32) /* pointer size */
1744 #define STKALIGN 4 /* stack alignment */
1746 #define PTR U64 /* pointer */
1747 #define PTRSIZE sizeof(U64) /* pointer size */
1748 #define STKALIGN 8 /* stack alignment */
1752 #define REG1 register /* register 1 - highest priority */
1753 #define REG2 register /* register 2 */
1754 #define REG3 register /* register 3 */
1755 #define REG4 register /* register 4 */
1756 #define REG5 register /* register 5 */
1757 #define REG6 register /* register 6 */
1758 #define REG7 register /* register 7 */
1759 #define REG8 register /* register 8 - lowest priority */
1761 #define FAR /* for large model */
1762 #define PTRSTRIDE 4 /* stride */
1766 #ifdef OTHMOD /* All other models */
1768 #define NULLP 0L /* null pointer */
1769 #define NULLD 0L /* null data */
1770 /* envdep_h_001.main_76 WIN32 and WIN64 falls here, so be sure PTR is correctly defined
1771 * when compiling 64bits
1773 /*envdep_h_001.main_77 SSI-4GMX specfic changes*/
1774 #ifndef SS_4GMX_LCORE
1776 #define PTR U64 /* pointer */
1777 #define PTRSIZE sizeof(U64) /* pointer size */
1778 #define STKALIGN 8 /* stack alignment */
1780 #define PTR U32 /* pointer */
1781 #define PTRSIZE sizeof(U32) /* pointer size */
1782 #define STKALIGN 4 /* stack alignment */
1785 #define PTR U32 /* pointer */
1786 #define PTRSIZE sizeof(U32) /* pointer size */
1787 #define STKALIGN 4 /* stack alignment */
1790 #define REG1 register /* register 1 - highest priority */
1791 #define REG2 register /* register 2 */
1792 #define REG3 register /* register 3 */
1793 #define REG4 register /* register 4 */
1794 #define REG5 register /* register 5 */
1795 #define REG6 register /* register 6 */
1796 #define REG7 register /* register 7 */
1797 #define REG8 register /* register 8 - lowest priority */
1799 #define FAR /* for large model */
1800 #define PTRSTRIDE 2 /* stride */
1801 #define MEM_NONSEG /* memory - non-segmented */
1805 /* pointer alignment macro */
1807 #define PTRALIGN(s) ((PTR)(s) % PTRSTRIDE ? ((PTR)(s) + (PTRSTRIDE - ((PTR)(s) % PTRSTRIDE))) : (PTR)(s))
1809 * This macro (DATAALIGN) should only be used in our
1810 * static memory algorithms (SGetSBuf).
1812 * Otherwise, use at your own risk!
1814 #define DATAALIGN(s) ((Size)(s) % PTRSTRIDE ? ((Size)(s) - (PTRSTRIDE - ((Size)(s) % PTRSTRIDE))) : (Size)(s))
1817 /* message function type macro */
1822 /* typedef and defines for argument manipulation */
1824 typedef S8 *ARGTYPE;
1826 #define ARG(argp,type) *((type*)argp)
1828 #define ARGINC(argp,type) argp=(ARGTYPE)(argp + (sizeof(type) < STKALIGN ? STKALIGN : sizeof(type)))
1830 /* Unused function parameter macro */
1834 #define UNUSED(x) (x=x)
1836 #define UNUSED(x) (x=x)
1840 /**********************************************************************
1842 **********************************************************************/
1845 trace macros are at the beginning of each function. they may
1846 be used for debugging purposes. the trace macros are turned on
1847 by the following command line option:
1849 TRACE0 - trace mos support functions
1850 TRACE1 - trace mos interface functions
1851 TRACE2 - trace layer support functions
1852 TRACE3 - trace layer interface functions
1853 TRACE4 - trace interrupt service functions
1855 there is one additional trace macro which turns on trace macros 0 - 4
1856 and pushes the text within trace macros 0 - 4 onto a stack. the text
1857 is popped of of the stack upon RETVOID or RETVALUE. this macro is:
1859 TRACE5 - trace call stack
1863 #ifdef TRACE5 /* trace 5 - call stack */
1864 #define TRACE0 /* trace 0 - mos support functions */
1865 #define TRACE1 /* trace 1 - mos interface functions */
1866 #define TRACE2 /* trace 2 - layer support functions */
1867 #define TRACE3 /* trace 3 - layer interface functions */
1868 #define TRACE4 /* trace 4 - interrupt service functions */
1870 #define T5M 64 /* trace 5 - maximum call stack height */
1871 extern S8 *t5s[]; /* trace 5 - call stack */
1872 extern S16 t5t; /* trace 5 - top of call stack */
1874 extern Void FAR exit(int);
1878 #ifdef TRACE5 /* trace 5 - call stack */
1880 #define TRC0(a) if(t5t>=0&&t5t<T5M-1) t5s[t5t++] = #a; else exit(0);
1882 #define TRC0(a) t5s[t5t++] = #a;
1885 #ifdef TRACE0 /* trace 0 - mos support functions */
1886 #ifdef ANSI /* ansi */
1887 #define TRC0(a) printf(#a "\n");
1888 #else /* not ansi */
1896 #ifdef TRACE5 /* trace 5 - call stack */
1898 #define TRC1(a) if(t5t>=0&&t5t<T5M-1) t5s[t5t++] = #a; else exit(0);
1900 #define TRC1(a) t5s[t5t++] = #a;
1903 #ifdef TRACE1 /* trace 1 - mos interface functions */
1904 #ifdef ANSI /* ansi */
1905 #define TRC1(a) printf(#a "\n");
1906 #else /* not ansi */
1914 #ifdef TRACE5 /* trace 5 - call stack */
1916 #define TRC2(a) if(t5t>=0&&t5t<T5M-1) t5s[t5t++] = #a; else exit(0);
1918 #define TRC2(a) t5s[t5t++] = #a;
1921 #ifdef TRACE2 /* trace 2 - layer support functions */
1922 #ifdef ANSI /* ansi */
1923 /* envdep_h_001.main_68 Corrected the macro */
1924 #define TRC2(a) printf(#a "\n");
1925 #else /* not ansi */
1933 #ifdef TRACE5 /* trace 5 - call stack */
1935 #define TRC3(a) if(t5t>=0&&t5t<T5M-1) t5s[t5t++] = #a; else exit(0);
1937 #define TRC3(a) t5s[t5t++] = #a;
1940 #ifdef TRACE3 /* trace 3 - layer interface functions */
1941 #ifdef ANSI /* ansi */
1942 /* envdep_h_001.main_68 Corrected the macro */
1943 #define TRC3(a) printf(#a "\n");
1944 #else /* not ansi */
1952 #ifdef TRACE5 /* trace 5 - call stack */
1954 #define TRC4(a) if(t5t>=0&&t5t<T5M-1) t5s[t5t++] = #a; else exit(0);
1956 #define TRC4(a) t5s[t5t++] = #a;
1959 #ifdef TRACE4 /* trace 4 - interrupt service functions */
1960 #ifdef ANSI /* ansi */
1961 #define TRC4(a) printf(#a "\n");
1962 #else /* not ansi */
1971 /**********************************************************************
1973 **********************************************************************/
1976 these returns are arranged first by environment (DOS, UNIX or
1977 embedded) followed by compiler (microsoft c, borland c, unix or
1978 microtec c) as appropriate.
1981 #ifdef DOS /* dos */
1982 #ifdef MSC51 /* dos, microsoft c */
1984 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
1985 /* envdep_h_001.main_76: Removed void type casting */
1986 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
1988 #define RETVOID return /* void */
1989 #define RETVALUE(v) return(v) /* return value */
1991 #else /* not microsoft c */
1992 #ifdef BOR31 /* dos, borland c */
1994 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
1995 /* envdep_h_001.main_76: Removed void type casting */
1996 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
1998 #define RETVOID return /* void */
1999 #define RETVALUE(v) return(v) /* return value */
2001 #else /* not borland c */
2005 #ifdef UNIX /* unix */
2007 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
2008 /* envdep_h_001.main_76: Removed void type casting */
2009 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
2012 #define RETVOID return /* void */
2013 #define RETVALUE(v) return(v) /* return value */
2015 #else /* not unix */
2016 #ifdef MOTADS /* embedded, motorola ads */
2017 #ifdef DOSMRI42D /* dos microtec c cross-compiler */
2019 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
2020 /* envdep_h_001.main_76: Removed void type casting */
2021 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
2023 #define RETVOID return /* void */
2024 #define RETVALUE(v) return(v) /* return value */
2026 #else /* not dos microtec c */
2027 #ifdef SOLMRI43 /* solaris microtec c cross-compiler */
2029 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
2030 /* envdep_h_001.main_76: Removed void type casting */
2031 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
2033 #define RETVOID return /* void */
2034 #define RETVALUE(v) return(v) /* return value */
2036 #else /* not solaris microtec c cross-compiler */
2037 #ifdef SOLOAS186 /* solaris oasys c cross-compiler */
2039 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
2040 /* envdep_h_001.main_76: Removed void type casting */
2041 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
2043 #define RETVOID return /* void */
2044 #define RETVALUE(v) return(v) /* return value */
2046 #else /* not microtec c, not oasys c */
2050 #else /* not motorola ads */
2052 #define RETVOID return(--t5t?(Void) 0 :(Void) 0) /* return void */
2053 /* envdep_h_001.main_76: Removed void type casting */
2054 #define RETVALUE(v) return(--t5t?(v):(v)) /* return value */
2056 #define RETVOID return /* void */
2057 #define RETVALUE(v) return(v) /* return value */
2059 #endif /* motorola ads */
2064 /* General Macros - Moved from envind.h */
2068 #define MIN(x, y) ((x) > (y) ? (y) : (x)) /* get minimum value */
2070 #define MIN(x, y) ((x) > (y) ? (y) : (x)) /* get minimum value */
2075 #define MAX(x, y) ((x) > (y) ? (x) : (y)) /* get maximum value */
2077 #define MAX(x, y) ((x) > (y) ? (x) : (y)) /* get maximum value */
2085 The following defines are used as switches throughout the
2088 PORTVER Portable version
2091 LCINT Loosely coupled - isdn network layer
2092 TCINT Tightly coupled - isdn network layer
2093 LCXNT Loosely coupled - x.25 network layer
2094 TCXNT Tightly coupled - x.25 network layer
2095 LCDAT Loosely coupled - data link layer
2096 TCDAT Tightly coupled - data link layer
2097 LCMAC Loosely coupled - mac layer
2098 TCMAC Tightly coupled - mac layer
2099 LCLM Loosely coupled - layer management
2100 TCLM Tightly coupled - layer management
2105 UNIX unix environment
2107 MSC51 microsoft c 5.1 compiler
2108 MSC60 microsoft c 6.0 compiler
2109 MSC70 microsoft c 7.0 compiler
2110 DOSMRI42D dos microtec c 4.2D cross-compiler
2111 SOLMRI43 solaris microtec c 4.3 cross-compiler
2112 SOLOAS186 solaris oasys 1.8.6 cross-compiler
2113 BOR31 borland c 3.1 compiler
2115 SUNOS sun os environment
2116 SUNOS41 sun os 4.1 environment and compiler
2117 SUNOS51 sun os 5.1 environment and compiler
2119 MSCDOS microsoft c, DOS environment - being phased out
2120 MSCUNIX microsoft c, UNIX environment - being phased out
2122 UC2 Franklin UC2A interface
2123 WT3 Retix WT-330 interface
2124 FUT Dassault AT-FUT interface
2125 MDP Dassault MOS/Driver interface
2129 TRC0 Trace 0 - MOS support functions
2130 TRC1 Trace 1 - MOS interface functions
2131 TRC2 Trace 2 - layer support functions
2132 TRC3 Trace 3 - layer interface functions
2133 TRC4 Trace 4 - interrupt service functions
2135 X28X29 X.28 and X.29 support
2139 #ifdef TENB_TTI_PERF
2140 #define TTI_THRESHOLD_VALUE 800
2148 #endif /* __ENVDEPH__ */
2151 /********************************************************************30**
2154 **********************************************************************/