1 {- join("\n",map { "/* $_ */" } @autowarntext) -}
6 /* OpenSSL was configured with the following options: */
8 if (@{$config{openssl_sys_defines}}) {
9 foreach (@{$config{openssl_sys_defines}}) {
10 $OUT .= "#ifndef $_\n";
11 $OUT .= "# define $_ 1\n";
17 #ifndef OPENSSL_DOING_MAKEDEPEND
20 if (@{$config{openssl_experimental_defines}}) {
21 foreach (@{$config{openssl_experimental_defines}}) {
22 (my $ex = $_) =~ s/_NO_/_EXPERIMENTAL_/;
23 $OUT .= "#ifndef $ex\n";
24 $OUT .= "# ifndef $_\n";
25 $OUT .= "# define $_\n";
33 foreach (@{$config{openssl_api_defines}}) {
34 (my $macro, my $value) = $_ =~ /^(.*?)=(.*?)$/;
35 $OUT .= "#define OPENSSL_MIN_API $value\n";
39 if (@{$config{openssl_algorithm_defines}}) {
40 foreach (@{$config{openssl_algorithm_defines}}) {
41 $OUT .= "#ifndef $_\n";
42 $OUT .= "# define $_\n";
46 " /* no ciphers excluded */\n";
50 #endif /* OPENSSL_DOING_MAKEDEPEND */
53 if (@{$config{openssl_thread_defines}}) {
54 foreach (@{$config{openssl_thread_defines}}) {
55 $OUT .= "#ifndef $_\n";
56 $OUT .= "# define $_\n";
63 if (@{$config{openssl_other_defines}}) {
64 foreach (@{$config{openssl_other_defines}}) {
65 $OUT .= "#ifndef $_\n";
66 $OUT .= "# define $_\n";
73 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
74 asks for it. This is a transient feature that is provided for those
75 who haven't had the time to do the appropriate changes in their
77 #ifdef OPENSSL_ALGORITHM_DEFINES
79 if (@{$config{openssl_algorithm_defines}}) {
80 foreach (@{$config{openssl_algorithm_defines}}) {
81 (my $ex = $_) =~ s/^OPENSSL_//;
82 $OUT .= "# if defined($_) \&\& !defined($ex)\n";
83 $OUT .= "# define $ex\n";
91 {- $target{cpuid_obj} ne "mem_clr.o" ? "#define OPENSSL_CPUID_OBJ" : "" -}
94 * Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
95 * declarations of functions deprecated in or before <version>. Otherwise, they
96 * still won't see them if the library has been built to disable deprecated
99 #if defined(OPENSSL_NO_DEPRECATED)
100 # define DECLARE_DEPRECATED(f)
101 #elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
102 # define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
104 # define DECLARE_DEPRECATED(f) f;
107 #ifndef OPENSSL_MIN_API
108 #define OPENSSL_MIN_API 0
111 #if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API
112 #undef OPENSSL_API_COMPAT
113 #define OPENSSL_API_COMPAT OPENSSL_MIN_API
116 #if OPENSSL_API_COMPAT < 0x10100000L
117 # define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f)
119 # define DEPRECATEDIN_1_1_0(f)
122 #if OPENSSL_API_COMPAT < 0x10000000L
123 # define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f)
125 # define DEPRECATEDIN_1_0_0(f)
128 #if OPENSSL_API_COMPAT < 0x00908000L
129 # define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f)
131 # define DEPRECATEDIN_0_9_8(f)
134 /* Generate 80386 code? */
135 {- $config{processor} eq "386" ? "#define" : "#undef" -} I386_ONLY
137 #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
138 #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
139 #define ENGINESDIR {- quotify1($config{enginesdir}) -}
140 #define OPENSSLDIR {- quotify1($config{openssldir}) -}
144 #undef OPENSSL_UNISTD
145 #define OPENSSL_UNISTD {- $target{unistd} -}
147 #undef OPENSSL_EXPORT_VAR_AS_FUNCTION
148 {- $config{export_var_as_fn} ? "#define OPENSSL_EXPORT_VAR_AS_FUNCTION" : "" -}
151 * The following are cipher-specific, but are part of the public API.
154 #define OSSL_DES_LONG {- $config{des_int} -}
156 #if !defined(OPENSSL_SYS_UEFI)
157 {- $config{bn_ll} ? "#define" : "#undef" -} BN_LLONG
159 /* Only one for the following should be defined */
160 {- $config{b64l} ? "#define" : "#undef" -} SIXTY_FOUR_BIT_LONG
161 {- $config{b64} ? "#define" : "#undef" -} SIXTY_FOUR_BIT
162 {- $config{b32} ? "#define" : "#undef" -} THIRTY_TWO_BIT
165 # define RC2_INT {- $config{rc2_int} -}
166 # define IDEA_INT {- $config{idea_int} -}
167 # define MD2_INT {- $config{md2_int} -}
168 # define RC4_INT {- $config{rc4_int} -}