home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / LINUX / MATH_EMU.ZIP / MATH_EMU / LINKAGE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1979-12-31  |  715 b   |  39 lines

  1. #ifndef _LINUX_LINKAGE_H
  2. #define _LINUX_LINKAGE_H
  3.  
  4. #ifdef __cplusplus
  5. #define asmlinkage extern "C"
  6. #else
  7. #define asmlinkage
  8. #endif
  9.  
  10. #ifdef __ELF__
  11. #define ALIGN .align 4
  12. #define ALIGN_STR ".align 4"
  13. #define SYMBOL_NAME_STR(X) #X
  14. #define SYMBOL_NAME(X) X
  15. #ifdef __STDC__
  16. #define SYMBOL_NAME_LABEL(X) X##:
  17. #else
  18. #define SYMBOL_NAME_LABEL(X) X/**/:
  19. #endif
  20. #else
  21. #define ALIGN .align 2
  22. #define ALIGN_STR ".align 2"
  23. #define SYMBOL_NAME_STR(X) "_"#X
  24. #ifdef __STDC__
  25. #define SYMBOL_NAME(X) _##X
  26. #define SYMBOL_NAME_LABEL(X) _##X##:
  27. #else
  28. #define SYMBOL_NAME(X) _/**/X
  29. #define SYMBOL_NAME_LABEL(X) _/**/X/**/:
  30. #endif
  31. #endif
  32.  
  33. #define ENTRY(name) \
  34.   .globl SYMBOL_NAME(name); \
  35.   ALIGN; \
  36.   SYMBOL_NAME_LABEL(name)
  37.  
  38. #endif
  39.