home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / HPACK78S.ZIP / defs.h < prev    next >
C/C++ Source or Header  |  1992-11-25  |  2KB  |  91 lines

  1. #ifndef _DEFS_DEFINED
  2.  
  3. /* Processor endianness.  Having to define this is unfortunate but is
  4.    necessary to speed up the encryption code, especially the RSA code */
  5.  
  6. #if defined( __ARC__ ) || defined( __MSDOS__ ) || defined( __OS2__ ) || \
  7.     defined( __VMS__ ) || defined( AIX370 ) || defined( AIX386 ) || \
  8.     defined( ISC ) || defined( LINUX ) || defined( ULTRIX ) || \
  9.     defined( ULTRIX_OLD )
  10.   #define LITTLE_ENDIAN
  11. #elif defined( AIX ) || defined( __AMIGA__ ) || defined( __ATARI__ ) || \
  12.       defined( IRIX ) || defined( __MAC__ ) || defined( MINT ) || \
  13.       defined( SUNOS )
  14.   #define BIG_ENDIAN
  15. #else
  16.   #error Need to add processor endianness #define to start of defs.h
  17. #endif /* Endianness defines */
  18.  
  19. /* Make sure none of the following have been defined elsewhere */
  20.  
  21. #ifdef BYTE
  22.   #undef BYTE
  23. #endif /* BYTE */
  24. #ifdef WORD
  25.   #undef WORD
  26. #endif /* WORD */
  27. #ifdef LONG
  28.   #undef LONG
  29. #endif /* LONG */
  30. #ifdef QUAD
  31.   #undef QUAD
  32. #endif /* QUAD */
  33. #ifdef LQUAD
  34.   #undef LQUAD
  35. #endif /* LQUAD */
  36. #ifdef BOOLEAN
  37.   #undef BOOLEAN
  38. #endif /* BOOLEAN */
  39.  
  40. /* Various types */
  41.  
  42. typedef unsigned char        BYTE;
  43. typedef unsigned short int    WORD;    /* 16-bit unsigned on most systems */
  44. #ifndef _OS2EMX_H
  45. typedef unsigned long int    LONG;    /* 32-bit unsigned on most systems */
  46. #endif /* _OS2EMX.H */
  47. typedef unsigned long int    QUAD;    /* 64-bit unsigned (fake as 32-bit) */
  48. typedef unsigned long int    LQUAD;    /* 128-bit unsigned (fake as 32-bit) */
  49.  
  50. #ifdef __MSDOS__
  51. typedef char    BOOLEAN;            /* If byte addressing is OK */
  52. #else
  53. typedef int        BOOLEAN;            /* If byte addressing is OK */
  54. #endif /* __MSDOS__ */
  55.  
  56. /* Size of various data types */
  57.  
  58. #define BITS_PER_BYTE    8
  59. #define BITS_PER_WORD    16
  60. #define BITS_PER_LONG    32
  61. #define BITS_PER_QUAD    64
  62. #define BITS_PER_LQUAD    128
  63.  
  64. /* Boolean constants */
  65.  
  66. #define FALSE    0
  67. #define TRUE    1
  68.  
  69. /* Exit status of functions. */
  70.  
  71. #define OK        0
  72. #define ERROR    -1
  73.  
  74. /* 'inline' patch for compilers which can't handle this */
  75.  
  76. #if !( defined( __CPLUSPLUS__ ) || defined( __cplusplus ) ) || defined( __TSC__ )
  77.   #define inline
  78. #endif /* !( __CPLUSPLUS__ || __cplusplus ) */
  79.  
  80. /* #pragma patch for TopSpeed C */
  81.  
  82. #ifdef __TSC__
  83.   #define warn
  84. #endif /* __TSC__ */
  85.  
  86. /* Flag the fact we've been #included */
  87.  
  88. #define _DEFS_DEFINED
  89.  
  90. #endif /* _DEFS_DEFINED */
  91.