openssl_user_macros.pod.in 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. =pod
  2. =head1 NAME
  3. openssl_user_macros, OPENSSL_API_COMPAT - User defined macros
  4. =head1 DESCRIPTION
  5. User defined macros allow the programmer to control certain aspects of
  6. what is exposed by the OpenSSL headers.
  7. B<NOTE:> to be effective, a user defined macro I<must be defined
  8. before including any header file that depends on it>, either in the
  9. compilation command (C<cc -DMACRO=value>) or by defining the macro in
  10. source before including any headers.
  11. Other manual pages may refer to this page when declarations depend on
  12. user defined macros.
  13. =head2 The macros
  14. =over 4
  15. =item B<OPENSSL_API_COMPAT>
  16. The value is a version number, given in one of the following two forms:
  17. =over 4
  18. =item C<0xMNNFF000L>
  19. This is the form supported for all versions up to 1.1.x, where C<M>
  20. represents the major number, C<NN> represents the minor number, and
  21. C<FF> represents the fix number, as a hexadecimal number. For version
  22. 1.1.0, that's C<0x10100000L>.
  23. Any version number may be given, but these numbers are
  24. the current known major deprecation points, making them the most
  25. meaningful:
  26. =over 4
  27. =item C<0x00908000L> (version 0.9.8)
  28. =item C<0x10000000L> (version 1.0.0)
  29. =item C<0x10100000L> (version 1.1.0)
  30. =back
  31. For convenience, higher numbers are accepted as well, as long as
  32. feasible. For example, C<0x60000000L> will work as expected.
  33. However, it is recommended to start using the second form instead:
  34. =item C<mmnnpp>
  35. This form is a simple decimal number calculated with this formula:
  36. I<major> * 10000 + I<minor> * 100 + I<patch>
  37. where I<major>, I<minor> and I<patch> are the desired major,
  38. minor and patch components of the version number. For example:
  39. =over 4
  40. =item 30000 corresponds to version 3.0.0
  41. =item 10002 corresponds to version 1.0.2
  42. =item 420101 corresponds to version 42.1.1
  43. =back
  44. =back
  45. If not set, this macro will default to
  46. C<{- join('', map { my @x = split /=/,$_; $x[1] }
  47. grep /^OPENSSL_CONFIGURED_API=/, @{$config{openssl_api_defines} // []})
  48. || '0x00000000L'
  49. -}>.
  50. =item B<OPENSSL_NO_DEPRECATED>
  51. If this macro is defined, all deprecated public symbols in all OpenSSL
  52. versions up to and including the version given by B<OPENSSL_API_COMPAT>
  53. will be hidden.
  54. =back
  55. =head1 COPYRIGHT
  56. Copyright 2018-2020 The OpenSSL Project Authors. All Rights Reserved.
  57. Licensed under the Apache License 2.0 (the "License"). You may not use
  58. this file except in compliance with the License. You can obtain a copy
  59. in the file LICENSE in the source distribution or at
  60. L<https://www.openssl.org/source/license.html>.
  61. =cut