opensslconf.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /* MacOS/opensslconf.h */
  2. #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
  3. # if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
  4. # define OPENSSLDIR "/usr/local/ssl"
  5. # endif
  6. #endif
  7. #if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
  8. # define IDEA_INT unsigned int
  9. #endif
  10. #if defined(HEADER_MD2_H) && !defined(MD2_INT)
  11. # define MD2_INT unsigned int
  12. #endif
  13. #if defined(HEADER_RC2_H) && !defined(RC2_INT)
  14. /* I need to put in a mod for the alpha - eay */
  15. # define RC2_INT unsigned int
  16. #endif
  17. #if defined(HEADER_RC4_H)
  18. # if !defined(RC4_INT)
  19. /*
  20. * using int types make the structure larger but make the code faster on most
  21. * boxes I have tested - up to %20 faster.
  22. */
  23. /*-
  24. * I don't know what does "most" mean, but declaring "int" is a must on:
  25. * - Intel P6 because partial register stalls are very expensive;
  26. * - elder Alpha because it lacks byte load/store instructions;
  27. */
  28. # define RC4_INT unsigned char
  29. # endif
  30. # if !defined(RC4_CHUNK)
  31. /*
  32. * This enables code handling data aligned at natural CPU word
  33. * boundary. See crypto/rc4/rc4_enc.c for further details.
  34. */
  35. # define RC4_CHUNK unsigned long
  36. # endif
  37. #endif
  38. #if defined(HEADER_DES_H) && !defined(DES_LONG)
  39. /*
  40. * If this is set to 'unsigned int' on a DEC Alpha, this gives about a %20
  41. * speed up (longs are 8 bytes, int's are 4).
  42. */
  43. # ifndef DES_LONG
  44. # define DES_LONG unsigned long
  45. # endif
  46. #endif
  47. #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
  48. # define CONFIG_HEADER_BN_H
  49. # if __option(longlong)
  50. # define BN_LLONG
  51. # else
  52. # undef BN_LLONG
  53. # endif
  54. /* Should we define BN_DIV2W here? */
  55. /* Only one for the following should be defined */
  56. /*
  57. * The prime number generation stuff may not work when EIGHT_BIT but I don't
  58. * care since I've only used this mode for debuging the bignum libraries
  59. */
  60. # undef SIXTY_FOUR_BIT_LONG
  61. # undef SIXTY_FOUR_BIT
  62. # define THIRTY_TWO_BIT
  63. # undef SIXTEEN_BIT
  64. # undef EIGHT_BIT
  65. #endif
  66. #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
  67. # define CONFIG_HEADER_RC4_LOCL_H
  68. /*
  69. * if this is defined data[i] is used instead of *data, this is a %20 speedup
  70. * on x86
  71. */
  72. # undef RC4_INDEX
  73. #endif
  74. #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
  75. # define CONFIG_HEADER_BF_LOCL_H
  76. # define BF_PTR
  77. #endif /* HEADER_BF_LOCL_H */
  78. #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
  79. # define CONFIG_HEADER_DES_LOCL_H
  80. /*
  81. * the following is tweaked from a config script, that is why it is a
  82. * protected undef/define
  83. */
  84. # ifndef DES_PTR
  85. # define DES_PTR
  86. # endif
  87. /*
  88. * This helps C compiler generate the correct code for multiple functional
  89. * units. It reduces register dependancies at the expense of 2 more
  90. * registers
  91. */
  92. # ifndef DES_RISC1
  93. # define DES_RISC1
  94. # endif
  95. # ifndef DES_RISC2
  96. # undef DES_RISC2
  97. # endif
  98. # if defined(DES_RISC1) && defined(DES_RISC2)
  99. YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED ! !!!!
  100. # endif
  101. /*
  102. * Unroll the inner loop, this sometimes helps, sometimes hinders. Very mucy
  103. * CPU dependant
  104. */
  105. # ifndef DES_UNROLL
  106. # define DES_UNROLL
  107. # endif
  108. #endif /* HEADER_DES_LOCL_H */
  109. #ifndef __POWERPC__
  110. # define MD32_XARRAY
  111. #endif