home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Usefull compiler stuff to be compatible with any compiler
- ** on the market.
- **
- */
-
- #ifndef _COMPILER_H
- #define _COMPILER_H
-
- /*
- ** Ignore this switches of SAS/Storm.
- */
- #ifdef __MAXON__
-
- # define __aligned
- # define __asm
- # define __regargs
- # define __saveds
- # define __stdargs
-
- #endif /* __MAXON__ */
-
-
- /*
- ** Ignore this switches of SAS/Storm.
- */
- #ifdef __GNUC__
-
- # define __d0
- # define __d1
- # define __d2
- # define __d3
- # define __d4
- # define __d5
- # define __d6
- # define __d7
- # define __a0
- # define __a1
- # define __a2
- # define __a3
- # define __a4
- # define __a5
- # define __a6
- # define __a7
-
- #endif /* __GNUC__ */
-
-
-
-
- #ifdef __SASC
-
- # define REG( r ) register __ ## r
- # define GNUCREG( r )
- # define SAVEDS __saveds
- # define ASM __asm
- # define REGARGS __regargs
- # define STDARGS __stdargs
- # define STACKARGS __stdargs
- # define ALIGNED __aligned
- # define FAR __far
- # define INLINE __inline
-
- #else
- # ifdef __MAXON__
-
- # define REG( r ) register __ ## r
- # define GNUCREG( r )
- # define SAVEDS
- # define ASM
- # define REGARGS
- # define STDARGS
- # define STACKARGS
- # define ALIGNED
- # define FAR
- # define INLINE
-
- # else
- # ifdef __STORM__
-
- # define REG( r ) register __ ## r
- # define GNUCREG( r )
- # define SAVEDS __saveds
- # define ASM
- # define REGARGS
- # define STDARGS
- # define STACKARGS
- # define ALIGNED
- # define FAR __far
- # define INLINE
- # define NO_PRAGMAS
- # define USE_GLUE
-
- # else
- # ifdef __GNUC__
-
- # define REG( r )
- # define GNUCREG( r ) __asm( #r )
- # define SAVEDS __saveds
- # define ASM
- # define REGARGS __regargs
- # define STDARGS __stdargs
- # define SACKARGS __stdargs
- # define ALIGNED __aligned
- # define FAR __far
- # define INLINE
- # define NO_PRAGMAS
- # define USE_GLUE
-
- # else /* Any other compiler. */
-
- # define REG( r )
- # define GNUCREG( r )
- # define SAVEDS
- # define ASM
- # define REGARGS
- # define STDARGS
- # define SACKARGS
- # define ALIGNED
- # define FAR
- # define INLINE
-
- # endif /* __GNUC__ */
- # endif /* __STORM__ */
- # endif /* __MAXON__ */
-
- #endif /* __SASC */
-
-
-
- /*
- ** Use glue code??? I.e. no direct assembly interface routines?
- */
- #ifdef USE_GLUE
-
- # ifdef ASM
- # undef ASM
- # endif /* ASM */
-
- # ifdef REG
- # undef REG
- # endif /* REG */
-
- # define ASM
- # define REG( x )
-
- #endif /* USE_GLUE */
-
-
- #endif /* _COMPILER_H */
-
-