X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fopenssl%2Fopensslconf.h.in;h=bc98cad51a64c23de1d81d932c2839dbe491072e;hb=edfd50d8db3ae20c1cba1667f861a25cbe6c31f2;hp=c22209bdc3271e8a66292d632cca38856adf49b5;hpb=effaf4dee90beff07bb40f21d81352304a5e8152;p=oweals%2Fopenssl.git diff --git a/include/openssl/opensslconf.h.in b/include/openssl/opensslconf.h.in index c22209bdc3..bc98cad51a 100644 --- a/include/openssl/opensslconf.h.in +++ b/include/openssl/opensslconf.h.in @@ -1,7 +1,16 @@ /* * {- join("\n * ", @autowarntext) -} + * + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html */ +#include + #ifdef __cplusplus extern "C" { #endif @@ -21,39 +30,17 @@ extern "C" { $OUT .= "#endif\n"; } } - if (@{$config{openssl_experimental_defines}}) { - foreach (@{$config{openssl_experimental_defines}}) { - (my $ex = $_) =~ s/_NO_/_EXPERIMENTAL_/; - $OUT .= "# ifndef $ex\n"; - $OUT .= "# ifndef $_\n"; - $OUT .= "# define $_\n"; - $OUT .= "# endif\n"; - $OUT .= "# endif\n"; - } - } foreach (@{$config{openssl_api_defines}}) { (my $macro, my $value) = $_ =~ /^(.*?)=(.*?)$/; - $OUT .= "# define OPENSSL_MIN_API $value\n"; + $OUT .= "#define $macro $value\n"; } if (@{$config{openssl_algorithm_defines}}) { foreach (@{$config{openssl_algorithm_defines}}) { - $OUT .= "# ifndef $_\n"; - $OUT .= "# define $_\n"; - $OUT .= "# endif\n"; + $OUT .= "#ifndef $_\n"; + $OUT .= "# define $_\n"; + $OUT .= "#endif\n"; } } - if ($OUT) { - $OUT = <<"EOF"; -#ifndef OPENSSL_DOING_MAKEDEPEND - -$OUT -#endif /* OPENSSL_DOING_MAKEDEPEND */ -EOF - } - ""; --} - -{- if (@{$config{openssl_thread_defines}}) { foreach (@{$config{openssl_thread_defines}}) { $OUT .= "#ifndef $_\n"; @@ -83,12 +70,24 @@ EOF * still won't see them if the library has been built to disable deprecated * functions. */ -#if defined(OPENSSL_NO_DEPRECATED) -# define DECLARE_DEPRECATED(f) -#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) -# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); -#else +#ifndef DECLARE_DEPRECATED # define DECLARE_DEPRECATED(f) f; +# ifdef __GNUC__ +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) +# undef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); +# endif +# endif +#endif + +#ifndef OPENSSL_FILE +# ifdef OPENSSL_NO_FILENAMES +# define OPENSSL_FILE "" +# define OPENSSL_LINE 0 +# else +# define OPENSSL_FILE __FILE__ +# define OPENSSL_LINE __LINE__ +# endif #endif #ifndef OPENSSL_MIN_API @@ -100,6 +99,18 @@ EOF # define OPENSSL_API_COMPAT OPENSSL_MIN_API #endif +/* + * Do not deprecate things to be deprecated in version 1.2.0 before the + * OpenSSL version number matches. + */ +#if OPENSSL_VERSION_NUMBER < 0x10200000L +# define DEPRECATEDIN_1_2_0(f) f; +#elif OPENSSL_API_COMPAT < 0x10200000L +# define DEPRECATEDIN_1_2_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_2_0(f) +#endif + #if OPENSSL_API_COMPAT < 0x10100000L # define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f) #else @@ -118,18 +129,9 @@ EOF # define DEPRECATEDIN_0_9_8(f) #endif -{- $target{cpuid_obj} ne "mem_clr.o" ? "#define OPENSSL_CPUID_OBJ" : "" -} - /* Generate 80386 code? */ {- $config{processor} eq "386" ? "#define" : "#undef" -} I386_ONLY -#if !defined(VMS) && !defined(__VMS) /* VMS uses logical names instead */ -# if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -# define ENGINESDIR {- quotify1($config{enginesdir}) -} -# define OPENSSLDIR {- quotify1($config{openssldir}) -} -# endif -#endif - #undef OPENSSL_UNISTD #define OPENSSL_UNISTD {- $target{unistd} -}