opensslconf.h.in 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /* crypto/opensslconf.h.in */
  2. /*
  3. * Applications should use -DOPENSSL_USE_DEPRECATED to enable access to
  4. * deprecated functions. But if the library has been built to disable
  5. * deprecated functions then this will not work
  6. */
  7. #if defined(OPENSSL_NO_DEPRECATED) && defined(OPENSSL_USE_DEPRECATED)
  8. #error "OPENSSL_USE_DEPRECATED has been defined, but OpenSSL has been built without support for deprecated functions"
  9. #endif
  10. /* Test for support for deprecated attribute */
  11. #if __GNUC__ > 3 || \
  12. (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
  13. #define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated))
  14. #else
  15. #define DECLARE_DEPRECATED(f) f
  16. #endif
  17. /* Generate 80386 code? */
  18. #undef I386_ONLY
  19. #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
  20. #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
  21. #define ENGINESDIR "/usr/local/lib/engines"
  22. #define OPENSSLDIR "/usr/local/ssl"
  23. #endif
  24. #endif
  25. #undef OPENSSL_UNISTD
  26. #define OPENSSL_UNISTD <unistd.h>
  27. #undef OPENSSL_EXPORT_VAR_AS_FUNCTION
  28. #if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
  29. #define IDEA_INT unsigned int
  30. #endif
  31. #if defined(HEADER_MD2_H) && !defined(MD2_INT)
  32. #define MD2_INT unsigned int
  33. #endif
  34. #if defined(HEADER_RC2_H) && !defined(RC2_INT)
  35. /* I need to put in a mod for the alpha - eay */
  36. #define RC2_INT unsigned int
  37. #endif
  38. #if defined(HEADER_RC4_H)
  39. #if !defined(RC4_INT)
  40. /* using int types make the structure larger but make the code faster
  41. * on most boxes I have tested - up to %20 faster. */
  42. /*
  43. * I don't know what does "most" mean, but declaring "int" is a must on:
  44. * - Intel P6 because partial register stalls are very expensive;
  45. * - elder Alpha because it lacks byte load/store instructions;
  46. */
  47. #define RC4_INT unsigned int
  48. #endif
  49. #if !defined(RC4_CHUNK)
  50. /*
  51. * This enables code handling data aligned at natural CPU word
  52. * boundary. See crypto/rc4/rc4_enc.c for further details.
  53. */
  54. #undef RC4_CHUNK
  55. #endif
  56. #endif
  57. #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
  58. /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
  59. * %20 speed up (longs are 8 bytes, int's are 4). */
  60. #ifndef DES_LONG
  61. #define DES_LONG unsigned long
  62. #endif
  63. #endif
  64. #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
  65. #define CONFIG_HEADER_BN_H
  66. #undef BN_LLONG
  67. /* Should we define BN_DIV2W here? */
  68. /* Only one for the following should be defined */
  69. #undef SIXTY_FOUR_BIT_LONG
  70. #undef SIXTY_FOUR_BIT
  71. #define THIRTY_TWO_BIT
  72. #endif
  73. #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
  74. #define CONFIG_HEADER_RC4_LOCL_H
  75. /* if this is defined data[i] is used instead of *data, this is a %20
  76. * speedup on x86 */
  77. #undef RC4_INDEX
  78. #endif
  79. #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
  80. #define CONFIG_HEADER_BF_LOCL_H
  81. #undef BF_PTR
  82. #endif /* HEADER_BF_LOCL_H */
  83. #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
  84. #define CONFIG_HEADER_DES_LOCL_H
  85. #ifndef DES_DEFAULT_OPTIONS
  86. /* the following is tweaked from a config script, that is why it is a
  87. * protected undef/define */
  88. #ifndef DES_PTR
  89. #undef DES_PTR
  90. #endif
  91. /* This helps C compiler generate the correct code for multiple functional
  92. * units. It reduces register dependancies at the expense of 2 more
  93. * registers */
  94. #ifndef DES_RISC1
  95. #undef DES_RISC1
  96. #endif
  97. #ifndef DES_RISC2
  98. #undef DES_RISC2
  99. #endif
  100. #if defined(DES_RISC1) && defined(DES_RISC2)
  101. YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
  102. #endif
  103. /* Unroll the inner loop, this sometimes helps, sometimes hinders.
  104. * Very mucy CPU dependant */
  105. #ifndef DES_UNROLL
  106. #undef DES_UNROLL
  107. #endif
  108. /* These default values were supplied by
  109. * Peter Gutman <pgut001@cs.auckland.ac.nz>
  110. * They are only used if nothing else has been defined */
  111. #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
  112. /* Special defines which change the way the code is built depending on the
  113. CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
  114. even newer MIPS CPU's, but at the moment one size fits all for
  115. optimization options. Older Sparc's work better with only UNROLL, but
  116. there's no way to tell at compile time what it is you're running on */
  117. #if defined( sun ) /* Newer Sparc's */
  118. # define DES_PTR
  119. # define DES_RISC1
  120. # define DES_UNROLL
  121. #elif defined( __ultrix ) /* Older MIPS */
  122. # define DES_PTR
  123. # define DES_RISC2
  124. # define DES_UNROLL
  125. #elif defined( __osf1__ ) /* Alpha */
  126. # define DES_PTR
  127. # define DES_RISC2
  128. #elif defined ( _AIX ) /* RS6000 */
  129. /* Unknown */
  130. #elif defined( __hpux ) /* HP-PA */
  131. /* Unknown */
  132. #elif defined( __aux ) /* 68K */
  133. /* Unknown */
  134. #elif defined( __sgi ) /* Newer MIPS */
  135. # define DES_PTR
  136. # define DES_RISC2
  137. # define DES_UNROLL
  138. #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
  139. # define DES_PTR
  140. # define DES_RISC1
  141. # define DES_UNROLL
  142. #endif /* Systems-specific speed defines */
  143. #endif
  144. #endif /* DES_DEFAULT_OPTIONS */
  145. #endif /* HEADER_DES_LOCL_H */