home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / gnu / mntinc16 / compiler.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-29  |  2.3 KB  |  91 lines

  1. /* compiler specific defines */
  2. /* this file is guaranteed to be included exactly once if you include
  3.    anything at all. all site-dependent or compiler-dependent stuff
  4.    should go here!!!
  5.  */
  6.  
  7. #ifndef _COMPILER_H
  8. #define _COMPILER_H
  9.  
  10. /* symbol to identify the library itself. this should _always_ be defined */
  11. #ifndef __MINT__
  12. #define __MINT__
  13. #endif
  14.  
  15. /* symbols to identify the type of compiler */
  16. #ifdef SOZOBON
  17. #define __SOZOBON__
  18. #endif
  19.  
  20. /* general library stuff */
  21. /* __SIZE_TYPEDEF__:     the type returned by sizeof() */
  22. /* __PTRDIFF_TYPEDEF__: the type of the difference of two pointers */
  23. /* __WCHAR_TYPEDEF__:     wide character type (i.e. type of L'x') */
  24. /* __EXITING: the type of a function that exits */
  25. /* symbols to report about compiler features */
  26. /* #define __NEED_VOID__    compiler doesn't have a void type */
  27. /* #define __MSHORT__        compiler uses 16 bit integers */
  28. /* (note that gcc and C68 define this automatically when appropriate) */
  29.  
  30. #ifdef __GNUC__
  31. #define __SIZE_TYPEDEF__ unsigned long
  32. #define __PTRDIFF_TYPEDEF__ long
  33. #define __WCHAR_TYPEDEF__ int
  34. #define __EXITING volatile void
  35. #ifndef __NO_INLINE__
  36. # define __GNUC_INLINE__
  37. #endif
  38. #endif
  39.  
  40. #ifdef __C68__
  41. #define __SIZE_TYPEDEF__ unsigned long
  42. #define __PTRDIFF_TYPEDEF__ long
  43. #define __WCHAR_TYPEDEF__ char
  44. #define __EXITING void
  45. #endif
  46.  
  47. #ifdef __SOZOBON__
  48. #define void char
  49.     /* sozobon knows about void, but void * confuses it a bit */
  50. #define __SIZE_TYPEDEF__ unsigned int
  51. #define __PTRDIFF_TYPEDEF__ long
  52. #define __WCHAR_TYPEDEF__ char
  53. #define __EXITING void
  54. #define __MSHORT__
  55. #endif
  56.  
  57. /* these are common to all compilers on the ST, I think */
  58. #define __VA_LIST__ char *
  59. #ifdef __MSHORT__
  60. #define __NULL ((void *)0)
  61. #else
  62. /* avoid complaints about misuse of NULL by silly programmers */
  63. #define __NULL (0)
  64. #endif
  65.  
  66. #ifdef __STDC__
  67. # ifndef __NO_PROTO__
  68. #  define __PROTO(x) x
  69. # endif
  70. # define __EXTERN
  71. #else
  72. # define __EXTERN extern
  73. /*
  74.  * fudge non-ANSI compilers to be like ANSI
  75.  */
  76. # define const
  77. # define volatile
  78.  
  79. # ifdef __NEED_VOID__
  80. typedef char void;    /* so that (void *) is the same as (char *) */
  81.     /* also lets us know that foo() {...} and void foo() {...} are
  82.        different */
  83. # endif
  84. #endif /* __STDC__ */
  85.  
  86. #ifndef __PROTO
  87. #define __PROTO(x) ()
  88. #endif
  89.  
  90. #endif /* _COMPILER_H */
  91.