home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Sound / Amster / Source / include / compiler.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-30  |  795 b   |  37 lines

  1. /*
  2. ** Compiler compatibility macros
  3. **
  4. ** This program is free software; you can redistribute it and/or
  5. ** modify it under the terms of the GNU General Public License.
  6. */
  7.  
  8. #ifndef INCLUDED_COMPILER_H
  9. #define INCLUDED_COMPILER_H
  10.  
  11. #ifdef __SASC
  12. #define SAVEDS __saveds
  13. #define ASM __asm
  14. #define REG(x,y) register __ ## x y
  15. #define ALIGNED __aligned
  16. #endif
  17.  
  18. #ifdef __GNUC__
  19. #define SAVEDS
  20. #define ASM
  21. #define ALIGNED
  22. #ifdef __MORPHOS__
  23. #define REG(x,y) y
  24. #else
  25. #define REG(x,y) y __asm( #x )
  26. #endif
  27. #endif
  28.  
  29. #ifdef __MORPHOS__
  30. #define InitHook(hook, funcname, data) ((hook)->h_Entry = (void *)&Gate_##funcname, (hook)->h_Data = (APTR)(data))
  31. #else
  32. #define InitHook(hook, funcname, data) ((hook)->h_Entry = (HOOKFUNC)funcname, (hook)->h_Data = (APTR)(data))
  33. #endif
  34.  
  35.  
  36. #endif    /* INCLUDED_COMPILER_H */
  37.