home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / online / source / c / compilers / Tickle-4.0.sit.hqx / Tickle-4.0 / cbtree / src / cdefs.h < prev    next >
Text File  |  1992-05-03  |  2KB  |  78 lines

  1. #ifndef    _CDEFS_H_
  2. #define    _CDEFS_H_
  3.  
  4. /* BEGIN TGE */
  5.  
  6. #ifdef NEVER_DEFINED
  7. #    define MALLOC(size)    Malloc(size, __FILE__, __LINE__)
  8. #    define FREE(ptr)        Free(ptr, __FILE__, __LINE__)
  9. #endif
  10.  
  11. #define MALLOC(size)    malloc(size)
  12. #define FREE(ptr)        free(ptr)
  13.  
  14. #ifndef u_long
  15.     typedef unsigned long u_long;
  16. #endif
  17.  
  18. #ifndef u_int
  19.     typedef unsigned int u_int;
  20. #endif
  21.  
  22. #ifndef u_char
  23.     typedef unsigned char u_char;
  24. #endif
  25.  
  26. #define htonl(x) x
  27.  
  28. #define LITTLE_ENDIAN   1234    /* LSB first: i386, vax */
  29. #define BIG_ENDIAN      4321    /* MSB first: 68000, ibm, net */
  30. #define PDP_ENDIAN      3412    /* LSB first in word, MSW first in long */
  31.  
  32. #define BYTE_ORDER      BIG_ENDIAN
  33.  
  34.  
  35. /* END   TGE */
  36.  
  37.  
  38. #if defined(__cplusplus)
  39. #define    __BEGIN_DECLS    extern "C" {
  40. #define    __END_DECLS    };
  41. #else
  42. #define    __BEGIN_DECLS
  43. #define    __END_DECLS
  44. #endif
  45.  
  46. /*
  47.  * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  48.  * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  49.  * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  50.  * in between its arguments.  __CONCAT can also concatenate double-quoted
  51.  * strings produced by the __STRING macro, but this only works with ANSI C.
  52.  */
  53. #if defined(__STDC__) || defined(__cplusplus)
  54. #define    __P(protos)    protos        /* full-blown ANSI C */
  55. #define    __CONCAT(x,y)    x ## y
  56. #define    __STRING(x)    #x
  57.  
  58. #else    /* !(__STDC__ || __cplusplus) */
  59. #define    __P(protos)    ()        /* traditional C preprocessor */
  60. #define    __CONCAT(x,y)    x/**/y
  61. #define    __STRING(x)    "x"
  62.  
  63. #ifdef __GNUC__
  64. #define    const        __const        /* GCC: ANSI C with -traditional */
  65. #define    inline        __inline
  66. #define    signed        __signed
  67. #define    volatile    __volatile
  68.  
  69. #else    /* !__GNUC__ */
  70. #define    const                /* delete ANSI C keywords */
  71. #define    inline
  72. #define    signed
  73. #define    volatile
  74. #endif    /* !__GNUC__ */
  75. #endif    /* !(__STDC__ || __cplusplus) */
  76.  
  77. #endif /* !_CDEFS_H_ */
  78.