]> git.ipfire.org Git - thirdparty/openssl.git/blame - include/openssl/opensslconf.h.in
poly1305/asm/poly1305-x86_64.pl: fix solaris64-x86_64-cc build.
[thirdparty/openssl.git] / include / openssl / opensslconf.h.in
CommitLineData
cde052f5
RS
1/*
2 * {- join("\n * ", @autowarntext) -}
e0a65194 3 *
2ad2281a 4 * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
e0a65194
RS
5 *
6 * Licensed under the OpenSSL license (the "License"). You may not use
7 * this file except in compliance with the License. You can obtain a copy
8 * in the file LICENSE in the source distribution or at
9 * https://www.openssl.org/source/license.html
cde052f5 10 */
dc193c9c
RS
11
12#ifdef __cplusplus
13extern "C" {
14#endif
cde052f5
RS
15
16#ifdef OPENSSL_ALGORITHM_DEFINES
17# error OPENSSL_ALGORITHM_DEFINES no longer supported
18#endif
19
20/*
21 * OpenSSL was configured with the following options:
22 */
23
24{- if (@{$config{openssl_sys_defines}}) {
dc193c9c
RS
25 foreach (@{$config{openssl_sys_defines}}) {
26 $OUT .= "#ifndef $_\n";
27 $OUT .= "# define $_ 1\n";
28 $OUT .= "#endif\n";
dc193c9c
RS
29 }
30 }
dc193c9c
RS
31 foreach (@{$config{openssl_api_defines}}) {
32 (my $macro, my $value) = $_ =~ /^(.*?)=(.*?)$/;
cd15cb4d 33 $OUT .= "#define $macro $value\n";
dc193c9c 34 }
dc193c9c
RS
35 if (@{$config{openssl_algorithm_defines}}) {
36 foreach (@{$config{openssl_algorithm_defines}}) {
f2adbd85
RS
37 $OUT .= "#ifndef $_\n";
38 $OUT .= "# define $_\n";
39 $OUT .= "#endif\n";
dc193c9c 40 }
dc193c9c 41 }
dc193c9c
RS
42 if (@{$config{openssl_thread_defines}}) {
43 foreach (@{$config{openssl_thread_defines}}) {
44 $OUT .= "#ifndef $_\n";
45 $OUT .= "# define $_\n";
46 $OUT .= "#endif\n";
47 }
48 }
dc193c9c
RS
49 if (@{$config{openssl_other_defines}}) {
50 foreach (@{$config{openssl_other_defines}}) {
51 $OUT .= "#ifndef $_\n";
52 $OUT .= "# define $_\n";
53 $OUT .= "#endif\n";
54 }
55 }
56 "";
57-}
58
effaf4de
RS
59/*
60 * Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers
61 * don't like that. This will hopefully silence them.
62 */
63#define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy;
64
dc193c9c
RS
65/*
66 * Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
67 * declarations of functions deprecated in or before <version>. Otherwise, they
68 * still won't see them if the library has been built to disable deprecated
69 * functions.
70 */
973abf52 71#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
dc193c9c
RS
72# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
73#else
74# define DECLARE_DEPRECATED(f) f;
75#endif
76
3ba84717 77#ifndef OPENSSL_FILE
f2adbd85
RS
78# ifdef OPENSSL_NO_FILENAMES
79# define OPENSSL_FILE ""
80# define OPENSSL_LINE 0
81# else
82# define OPENSSL_FILE __FILE__
83# define OPENSSL_LINE __LINE__
84# endif
3ba84717
DW
85#endif
86
dc193c9c 87#ifndef OPENSSL_MIN_API
cde052f5 88# define OPENSSL_MIN_API 0
dc193c9c
RS
89#endif
90
91#if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API
cde052f5
RS
92# undef OPENSSL_API_COMPAT
93# define OPENSSL_API_COMPAT OPENSSL_MIN_API
dc193c9c
RS
94#endif
95
5ecff87d
RS
96#if OPENSSL_API_COMPAT < 0x10200000L
97# define DEPRECATEDIN_1_2_0(f) DECLARE_DEPRECATED(f)
98#else
99# define DEPRECATEDIN_1_2_0(f)
100#endif
101
dc193c9c
RS
102#if OPENSSL_API_COMPAT < 0x10100000L
103# define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f)
104#else
105# define DEPRECATEDIN_1_1_0(f)
106#endif
107
108#if OPENSSL_API_COMPAT < 0x10000000L
109# define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f)
110#else
111# define DEPRECATEDIN_1_0_0(f)
112#endif
113
114#if OPENSSL_API_COMPAT < 0x00908000L
115# define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f)
116#else
117# define DEPRECATEDIN_0_9_8(f)
118#endif
119
120/* Generate 80386 code? */
121{- $config{processor} eq "386" ? "#define" : "#undef" -} I386_ONLY
122
dc193c9c
RS
123#undef OPENSSL_UNISTD
124#define OPENSSL_UNISTD {- $target{unistd} -}
125
cde052f5 126{- $config{export_var_as_fn} ? "#define" : "#undef" -} OPENSSL_EXPORT_VAR_AS_FUNCTION
dc193c9c
RS
127
128/*
129 * The following are cipher-specific, but are part of the public API.
130 */
dc193c9c 131#if !defined(OPENSSL_SYS_UEFI)
cde052f5 132{- $config{bn_ll} ? "# define" : "# undef" -} BN_LLONG
dc193c9c 133/* Only one for the following should be defined */
cde052f5
RS
134{- $config{b64l} ? "# define" : "# undef" -} SIXTY_FOUR_BIT_LONG
135{- $config{b64} ? "# define" : "# undef" -} SIXTY_FOUR_BIT
136{- $config{b32} ? "# define" : "# undef" -} THIRTY_TWO_BIT
dc193c9c
RS
137#endif
138
cde052f5 139#define RC4_INT {- $config{rc4_int} -}
dc193c9c
RS
140
141#ifdef __cplusplus
142}
143#endif