opensslconf.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. #include <openssl/opensslfeatures.h>
  2. /* crypto/opensslconf.h.in */
  3. #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
  4. #define OPENSSLDIR "/etc/ssl"
  5. #endif
  6. #undef OPENSSL_UNISTD
  7. #define OPENSSL_UNISTD <unistd.h>
  8. #undef OPENSSL_EXPORT_VAR_AS_FUNCTION
  9. #if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
  10. #define IDEA_INT unsigned int
  11. #endif
  12. #if defined(HEADER_MD2_H) && !defined(MD2_INT)
  13. #define MD2_INT unsigned int
  14. #endif
  15. #if defined(HEADER_RC2_H) && !defined(RC2_INT)
  16. /* I need to put in a mod for the alpha - eay */
  17. #define RC2_INT unsigned int
  18. #endif
  19. #if defined(HEADER_RC4_H)
  20. #if !defined(RC4_INT)
  21. /* using int types make the structure larger but make the code faster
  22. * on most boxes I have tested - up to %20 faster. */
  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 int
  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. #undef RC4_CHUNK
  36. #endif
  37. #endif
  38. #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
  39. /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
  40. * %20 speed up (longs are 8 bytes, int's are 4). */
  41. #ifndef DES_LONG
  42. #define DES_LONG unsigned long
  43. #endif
  44. #endif
  45. #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
  46. #define CONFIG_HEADER_BN_H
  47. #define BN_LLONG
  48. /* Should we define BN_DIV2W here? */
  49. /* Only one for the following should be defined */
  50. /* The prime number generation stuff may not work when
  51. * EIGHT_BIT but I don't care since I've only used this mode
  52. * for debugging the bignum libraries */
  53. #undef SIXTY_FOUR_BIT_LONG
  54. #undef SIXTY_FOUR_BIT
  55. #define THIRTY_TWO_BIT
  56. #undef SIXTEEN_BIT
  57. #undef EIGHT_BIT
  58. #endif
  59. #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
  60. #define CONFIG_HEADER_RC4_LOCL_H
  61. /* if this is defined data[i] is used instead of *data, this is a %20
  62. * speedup on x86 */
  63. #define RC4_INDEX
  64. #endif
  65. #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
  66. #define CONFIG_HEADER_BF_LOCL_H
  67. #undef BF_PTR
  68. #endif /* HEADER_BF_LOCL_H */
  69. #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
  70. #define CONFIG_HEADER_DES_LOCL_H
  71. #ifndef DES_DEFAULT_OPTIONS
  72. /* the following is tweaked from a config script, that is why it is a
  73. * protected undef/define */
  74. #ifndef DES_PTR
  75. #define DES_PTR
  76. #endif
  77. /* This helps C compiler generate the correct code for multiple functional
  78. * units. It reduces register dependencies at the expense of 2 more
  79. * registers */
  80. #ifndef DES_RISC1
  81. #define DES_RISC1
  82. #endif
  83. #ifndef DES_RISC2
  84. #undef DES_RISC2
  85. #endif
  86. #if defined(DES_RISC1) && defined(DES_RISC2)
  87. YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
  88. #endif
  89. /* Unroll the inner loop, this sometimes helps, sometimes hinders.
  90. * Very much CPU dependent */
  91. #ifndef DES_UNROLL
  92. #define DES_UNROLL
  93. #endif
  94. /* These default values were supplied by
  95. * Peter Gutman <[email protected]>
  96. * They are only used if nothing else has been defined */
  97. #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
  98. /* Special defines which change the way the code is built depending on the
  99. CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
  100. even newer MIPS CPU's, but at the moment one size fits all for
  101. optimization options. Older Sparc's work better with only UNROLL, but
  102. there's no way to tell at compile time what it is you're running on */
  103. #if defined( sun ) /* Newer Sparc's */
  104. # define DES_PTR
  105. # define DES_RISC1
  106. # define DES_UNROLL
  107. #elif defined( __ultrix ) /* Older MIPS */
  108. # define DES_PTR
  109. # define DES_RISC2
  110. # define DES_UNROLL
  111. #elif defined( __osf1__ ) /* Alpha */
  112. # define DES_PTR
  113. # define DES_RISC2
  114. #elif defined ( _AIX ) /* RS6000 */
  115. /* Unknown */
  116. #elif defined( __hpux ) /* HP-PA */
  117. /* Unknown */
  118. #elif defined( __aux ) /* 68K */
  119. /* Unknown */
  120. #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
  121. # define DES_UNROLL
  122. #elif defined( __sgi ) /* Newer MIPS */
  123. # define DES_PTR
  124. # define DES_RISC2
  125. # define DES_UNROLL
  126. #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
  127. # define DES_PTR
  128. # define DES_RISC1
  129. # define DES_UNROLL
  130. #endif /* Systems-specific speed defines */
  131. #endif
  132. #endif /* DES_DEFAULT_OPTIONS */
  133. #endif /* HEADER_DES_LOCL_H */