1 /* crypto/opensslconf.h.in */
4 * Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
5 * declarations of functions deprecated in or before <version>. Otherwise, they
6 * still won't see them if the library has been built to disable deprecated
9 #if defined(OPENSSL_NO_DEPRECATED)
10 # define DECLARE_DEPRECATED(f)
11 #elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
12 # define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
14 # define DECLARE_DEPRECATED(f) f;
17 #ifndef OPENSSL_MIN_API
18 #define OPENSSL_MIN_API 0
21 #if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API
22 #undef OPENSSL_API_COMPAT
23 #define OPENSSL_API_COMPAT OPENSSL_MIN_API
26 #if OPENSSL_API_COMPAT < 0x10100000L
27 # define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f)
29 # define DEPRECATEDIN_1_1_0(f)
32 #if OPENSSL_API_COMPAT < 0x10000000L
33 # define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f)
35 # define DEPRECATEDIN_1_0_0(f)
38 #if OPENSSL_API_COMPAT < 0x00908000L
39 # define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f)
41 # define DEPRECATEDIN_0_9_8(f)
44 /* Generate 80386 code? */
47 #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
48 #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
49 #define ENGINESDIR "/usr/local/lib/engines"
50 #define OPENSSLDIR "/usr/local/ssl"
55 #define OPENSSL_UNISTD <unistd.h>
57 #undef OPENSSL_EXPORT_VAR_AS_FUNCTION
59 #if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
60 #define IDEA_INT unsigned int
63 #if defined(HEADER_MD2_H) && !defined(MD2_INT)
64 #define MD2_INT unsigned int
67 #if defined(HEADER_RC2_H) && !defined(RC2_INT)
68 /* I need to put in a mod for the alpha - eay */
69 #define RC2_INT unsigned int
72 #if defined(HEADER_RC4_H)
74 /* using int types make the structure larger but make the code faster
75 * on most boxes I have tested - up to %20 faster. */
77 * I don't know what does "most" mean, but declaring "int" is a must on:
78 * - Intel P6 because partial register stalls are very expensive;
79 * - elder Alpha because it lacks byte load/store instructions;
81 #define RC4_INT unsigned int
83 #if !defined(RC4_CHUNK)
85 * This enables code handling data aligned at natural CPU word
86 * boundary. See crypto/rc4/rc4_enc.c for further details.
92 #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
93 /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
94 * %20 speed up (longs are 8 bytes, int's are 4). */
96 #define DES_LONG unsigned long
100 #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) && !defined(OPENSSL_SYS_UEFI)
101 #define CONFIG_HEADER_BN_H
104 /* Should we define BN_DIV2W here? */
106 /* Only one for the following should be defined */
107 #undef SIXTY_FOUR_BIT_LONG
108 #undef SIXTY_FOUR_BIT
109 #define THIRTY_TWO_BIT
112 #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
113 #define CONFIG_HEADER_RC4_LOCL_H
114 /* if this is defined data[i] is used instead of *data, this is a %20
119 #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
120 #define CONFIG_HEADER_BF_LOCL_H
122 #endif /* HEADER_BF_LOCL_H */
124 #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
125 #define CONFIG_HEADER_DES_LOCL_H
126 #ifndef DES_DEFAULT_OPTIONS
127 /* the following is tweaked from a config script, that is why it is a
128 * protected undef/define */
133 /* This helps C compiler generate the correct code for multiple functional
134 * units. It reduces register dependancies at the expense of 2 more
144 #if defined(DES_RISC1) && defined(DES_RISC2)
145 #error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
148 /* Unroll the inner loop, this sometimes helps, sometimes hinders.
149 * Very mucy CPU dependant */
154 /* These default values were supplied by
155 * Peter Gutman <pgut001@cs.auckland.ac.nz>
156 * They are only used if nothing else has been defined */
157 #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
158 /* Special defines which change the way the code is built depending on the
159 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
160 even newer MIPS CPU's, but at the moment one size fits all for
161 optimization options. Older Sparc's work better with only UNROLL, but
162 there's no way to tell at compile time what it is you're running on */
164 #if defined(sparc) || defined(__sparc__) /* Newer Sparc's */
168 #elif defined( __ultrix ) /* Older MIPS */
172 #elif defined( __osf1__ ) /* Alpha */
175 #elif defined ( _AIX ) /* RS6000 */
177 #elif defined( __hpux ) /* HP-PA */
179 #elif defined( __aux ) /* 68K */
181 #elif defined( __sgi ) /* Newer MIPS */
185 #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
189 #endif /* Systems-specific speed defines */
192 #endif /* DES_DEFAULT_OPTIONS */
193 #endif /* HEADER_DES_LOCL_H */