1*b0d17251Schristos=pod 2*b0d17251Schristos 3*b0d17251Schristos=head1 NAME 4*b0d17251Schristos 5*b0d17251Schristosopenssl_user_macros, OPENSSL_API_COMPAT, OPENSSL_NO_DEPRECATED 6*b0d17251Schristos- User defined macros 7*b0d17251Schristos 8*b0d17251Schristos=head1 DESCRIPTION 9*b0d17251Schristos 10*b0d17251SchristosUser defined macros allow the programmer to control certain aspects of 11*b0d17251Schristoswhat is exposed by the OpenSSL headers. 12*b0d17251Schristos 13*b0d17251SchristosB<NOTE:> to be effective, a user defined macro I<must be defined 14*b0d17251Schristosbefore including any header file that depends on it>, either in the 15*b0d17251Schristoscompilation command (C<cc -DMACRO=value>) or by defining the macro in 16*b0d17251Schristossource before including any headers. 17*b0d17251Schristos 18*b0d17251SchristosOther manual pages may refer to this page when declarations depend on 19*b0d17251Schristosuser defined macros. 20*b0d17251Schristos 21*b0d17251Schristos=head2 The macros 22*b0d17251Schristos 23*b0d17251Schristos=over 4 24*b0d17251Schristos 25*b0d17251Schristos=item B<OPENSSL_API_COMPAT> 26*b0d17251Schristos 27*b0d17251SchristosThe value is a version number, given in one of the following two forms: 28*b0d17251Schristos 29*b0d17251Schristos=over 4 30*b0d17251Schristos 31*b0d17251Schristos=item C<0xMNNFF000L> 32*b0d17251Schristos 33*b0d17251SchristosThis is the form supported for all versions up to 1.1.x, where C<M> 34*b0d17251Schristosrepresents the major number, C<NN> represents the minor number, and 35*b0d17251SchristosC<FF> represents the fix number, as a hexadecimal number. For version 36*b0d17251Schristos1.1.0, that's C<0x10100000L>. 37*b0d17251Schristos 38*b0d17251SchristosAny version number may be given, but these numbers are 39*b0d17251Schristosthe current known major deprecation points, making them the most 40*b0d17251Schristosmeaningful: 41*b0d17251Schristos 42*b0d17251Schristos=over 4 43*b0d17251Schristos 44*b0d17251Schristos=item C<0x00908000L> (version 0.9.8) 45*b0d17251Schristos 46*b0d17251Schristos=item C<0x10000000L> (version 1.0.0) 47*b0d17251Schristos 48*b0d17251Schristos=item C<0x10100000L> (version 1.1.0) 49*b0d17251Schristos 50*b0d17251Schristos=back 51*b0d17251Schristos 52*b0d17251SchristosFor convenience, higher numbers are accepted as well, as long as 53*b0d17251Schristosfeasible. For example, C<0x60000000L> will work as expected. 54*b0d17251SchristosHowever, it is recommended to start using the second form instead: 55*b0d17251Schristos 56*b0d17251Schristos=item C<mmnnpp> 57*b0d17251Schristos 58*b0d17251SchristosThis form is a simple decimal number calculated with this formula: 59*b0d17251Schristos 60*b0d17251SchristosI<major> * 10000 + I<minor> * 100 + I<patch> 61*b0d17251Schristos 62*b0d17251Schristoswhere I<major>, I<minor> and I<patch> are the desired major, 63*b0d17251Schristosminor and patch components of the version number. For example: 64*b0d17251Schristos 65*b0d17251Schristos=over 4 66*b0d17251Schristos 67*b0d17251Schristos=item 30000 corresponds to version 3.0.0 68*b0d17251Schristos 69*b0d17251Schristos=item 10002 corresponds to version 1.0.2 70*b0d17251Schristos 71*b0d17251Schristos=item 420101 corresponds to version 42.1.1 72*b0d17251Schristos 73*b0d17251Schristos=back 74*b0d17251Schristos 75*b0d17251Schristos=back 76*b0d17251Schristos 77*b0d17251SchristosIf B<OPENSSL_API_COMPAT> is undefined, this default value is used in its 78*b0d17251Schristosplace: 79*b0d17251SchristosC<{- join('', map { my @x = split /=/,$_; $x[1] } 80*b0d17251Schristos grep /^OPENSSL_CONFIGURED_API=/, @{$config{openssl_api_defines} // []}) 81*b0d17251Schristos || '0x00000000L' 82*b0d17251Schristos -}> 83*b0d17251Schristos 84*b0d17251Schristos=item B<OPENSSL_NO_DEPRECATED> 85*b0d17251Schristos 86*b0d17251SchristosIf this macro is defined, all deprecated public symbols in all OpenSSL 87*b0d17251Schristosversions up to and including the version given by B<OPENSSL_API_COMPAT> 88*b0d17251Schristos(or the default value given above, when B<OPENSSL_API_COMPAT> isn't defined) 89*b0d17251Schristoswill be hidden. 90*b0d17251Schristos 91*b0d17251Schristos=back 92*b0d17251Schristos 93*b0d17251Schristos=head1 COPYRIGHT 94*b0d17251Schristos 95*b0d17251SchristosCopyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved. 96*b0d17251Schristos 97*b0d17251SchristosLicensed under the Apache License 2.0 (the "License"). You may not use 98*b0d17251Schristosthis file except in compliance with the License. You can obtain a copy 99*b0d17251Schristosin the file LICENSE in the source distribution or at 100*b0d17251SchristosL<https://www.openssl.org/source/license.html>. 101*b0d17251Schristos 102*b0d17251Schristos=cut 103